Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set the focus to a specific form textbox on an asp page 1

Status
Not open for further replies.

PaulBricker

Programmer
Sep 25, 2002
3,554
US
I have an asp page that opens to a form. I would like to set the focus to the first textbox on the form. In a VBA module you would use GoToControl or SetFocus. Is there something in VBScript that I can use to set the cursor in the first textbox on my asp page.

Thanks

Paul
 
Do a keyword search in this forum for focus

Hope This Help
PH.
 
OK, maybe I need a lesson in Keyword searching. I tried searching on the key words "set focus" earlier and now I've tried using just the keyword "focus", but there wasn't a single VBScript reply displayed on the first page of my response set(I didn't bother going to the second page and further yet). Any suggestions on narrowing down the search to just the VBScript forum.

Thanks

Paul
 
Start your search (Keyword Search Tab near the top of this page) when you're in this forum and check the VBScript Only radio button.

Hope This Help
PH.
 
I do appreciate you taking the time to answer, but I'm missing something BIG TIME. I go to the top of the page, select Advanced Search and that brings up a box that has
"Advanced Search"
Keyword(s)
Under the scope section, I have
Just My Forums(Threadminder List)
Full Site (All Topic Areas)

then the rest of the sections are
Code:
Use                      Area

Fields                   When

I can't find a radio button to select the VBScript forum anyplace. Am I nuts, am I looking in the wrong area? If I can find a way to do a keyword search on a specific forum, that will do more for me than anything else I can think of.

Paul
 
Duh! I found it. How long have I been here??? That's a very good thing to know. No wonder my wife is always saying "It's right in front of you".

Thanks

Paul
 
I eventually found the answer in the Microsoft Active Server Page(ASP) forum using this line to set the focus in the txtPersonRequesting textbox.

<body onLoad = &quot;document.forms[0].txtPersonRequesting.focus();&quot;>

But the star is because I finally found a way to search inside a specific forum. I'd hand out a dozen if I could.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top