473,799 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Focus When Page Opens

How can I have the focus on a specific textbox when a page opens? In the old
ASP pages I could use an onload directive in the <Body> element but that
does not work on my aspx pages?

Wayne
Nov 18 '05 #1
4 1190
Why not? It certainly does work. Client side javascript hasn't changed.

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
How can I have the focus on a specific textbox when a page opens? In the old ASP pages I could use an onload directive in the <Body> element but that
does not work on my aspx pages?

Wayne

Nov 18 '05 #2
Hmmm... I'll go back and look again but it sure wasn't setting focus?

Wayne

"Marina" <so*****@nospam .com> wrote in message
news:eG******** ******@TK2MSFTN GP14.phx.gbl...
Why not? It certainly does work. Client side javascript hasn't changed.

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
How can I have the focus on a specific textbox when a page opens? In the

old
ASP pages I could use an onload directive in the <Body> element but that
does not work on my aspx pages?

Wayne


Nov 18 '05 #3
He could be having problems if SmartNavigation is turned on...

Greg

"Marina" <so*****@nospam .com> wrote in message
news:eG******** ******@TK2MSFTN GP14.phx.gbl...
Why not? It certainly does work. Client side javascript hasn't changed.

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
How can I have the focus on a specific textbox when a page opens? In the

old
ASP pages I could use an onload directive in the <Body> element but that
does not work on my aspx pages?

Wayne


Nov 18 '05 #4
My fault - I had a typo in all 3 places - spelling is something I am still
working on <smile!>

Wayne

"Marina" <so*****@nospam .com> wrote in message
news:eG******** ******@TK2MSFTN GP14.phx.gbl...
Why not? It certainly does work. Client side javascript hasn't changed.

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
How can I have the focus on a specific textbox when a page opens? In the

old
ASP pages I could use an onload directive in the <Body> element but that
does not work on my aspx pages?

Wayne


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8719
by: Guus Ellenkamp | last post by:
I want to use a second window to link to and put new content in it and pop up is some link is clicked. How to set the focus to the second window if it's already open. With what I do now, the window stays below my main window.
20
12308
by: Arne | last post by:
During testing <div style="overflow:auto;"> in CSS I noticed the mousewheel would work in Mozilla only after I made a <a href="#">some text</a> link and clicked on that, within the div. It appears as if Mozilla needs to have the focus set on that div in order for the mousewheel to work. That's all that link does. The mousewheel works perfectly in IE without the link. It scrolls the div even if there is a scrollbar on the page. Is...
13
2085
by: theintrepidfox | last post by:
Dear Group I wondered whether you can help me with this. I do have a page that contains a button and an IFrame. The IFrame contains a dummy page that is set to redirect to a word document when loaded so eventually the word document will be displayed in the IFrame. That works all well. No problem. The only trouble I have is with the button contained on the parent page. When pressed, it runs this script:
5
3786
by: Melissa | last post by:
1. Is there a way to programatically remove the focus from the form; ie, so the focus is not on any control on the form? 2. Is there a way to programatically set the focus to the same place as is done when the form opens; ie, the first control in the taborder which is visible, which is enabled and whose tabstop property is True? I have a form with forty two small subforms and I want to code the Enter event of all the subform controls...
2
3657
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl As Control Set MyControl = Screen.ActiveControl MyControl.BackColor = 65280 Tabbing from control-to-control is great. Each time I land on
3
8321
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There are a couple of people selling components... but that is not really an option for me... So, I took the plunge and modified the "WebUIValidation.js" file to make it happen... After tracing through file, I figure it out. It was actually pretty...
1
1477
by: test test | last post by:
Hi, How can I set focus to a particular textbox on an aspx page in vb code? My problem is caused by the page updating when a user clicks a command button and I execute code (like updating a price when you click "Calculate" button, etc.). The button they click and the "Total" field is down toward the bottom of the web page and when the page updates, it resets to the top like you just opened the page. I have searched on the "Focus"...
3
2168
by: kelvin.koogan | last post by:
I have a number of controls on a tab page. I want to validate them all when the user tries to leave the tab. I then want to highlight the first control which fails validation. How can I do this? I try setting focus but something seems to set the focus back to the control which had it before validation. Any ideas? TIA, KK
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.