SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 18th, 2004, 03:02 AM
Sada1089 Sada1089 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Billings, MT USA
Posts: 2 Sada1089 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Selecting a textbox

I have a form that asks for certain data like Name, Address, Phone, etc. How can I make the cursor automatically go to the first box without clicking in the box?

Bruce

Reply With Quote
  #2  
Old August 18th, 2004, 04:00 AM
webnerd webnerd is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Brisbane, Australia
Posts: 42 webnerd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Selecting a textbox

This really belongs in "Client Side Things"...

The standards compliant way to do it is to give the input tag an ID and then use the getElementByID (javascript) function to find it and focus it.

Code:
<form action="whatever.php" method="post">
<input type="text" id="NameBox" name="Name" value="">
</form>

<script type="text/javascript">
<!--
firstBox = document.getElementById("NameBox");
firstBox.focus();
// -->
</script>

Reply With Quote
  #3  
Old August 19th, 2004, 03:27 PM
Sada1089 Sada1089 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Billings, MT USA
Posts: 2 Sada1089 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Selecting a textbox

That worked great, Thankyou!
I'll check out the othe area you mentioned.

Bruce

Reply With Quote
  #4  
Old August 19th, 2004, 03:30 PM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Client Side Things' by notepad.

Reason:

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Selecting a textbox


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway