Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 06-04-2004, 07:35 AM
younghistorians's Avatar
younghistorians younghistorians is offline
Contributing Member
 
Join Date: 10-13-03
Location: USA
Posts: 662
iTrader: 0 / 0%
jump to form field

Does anyone know the code that Yahoo and Google use to have your cursor automatically jump to a text field? For instance, when you go to google, you can just start typing instead of having to click in the search box.


Anyone know or use this code?

thanks
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 06-04-2004, 07:40 AM
SVB's Avatar
SVB SVB is offline
Contributing Member
 
Join Date: 10-13-03
Posts: 3,112
iTrader: 0 / 0%
[code:1:6a15114165]
<script language="javascript" event="onload" for="window">
<!--
for (oForm in document.forms) {
for (oElement in document.forms(oForm.id)) {
document.forms(oForm.id).elements(oElement.id).foc us();
break;
}
}
-->
</script>
[/code:1:6a15114165]
Stick that at the top of the page
 
Reply With Quote
  #3  
Old 06-04-2004, 07:40 AM
hatchet's Avatar
hatchet hatchet is offline
Senior Member
 
Join Date: 10-11-03
Posts: 833
iTrader: 0 / 0%
onLoad="this.focus()"
 
Reply With Quote
  #4  
Old 06-04-2004, 07:45 AM
imaginemn's Avatar
imaginemn imaginemn is offline
v7n Mentor
 
Join Date: 02-18-04
Location: Brownsville, Texas
Posts: 1,354
iTrader: 0 / 0%
You could try something like this.

[code:1:5d9ba42e07]<HTML>

<body onLoad="document.form_name.form_field.focus();">


<form name="form_name">
<input name="form_field" value="">
</form>

</body>
</html>[/code:1:5d9ba42e07]

imaginemn
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert form results to a hidden field... malhyp Coding Forum 3 06-02-2006 09:10 AM
Your recommended Form Field Validation Javascript bestempire Coding Forum 1 05-30-2006 07:18 AM
Form Field in Subject Line TGR Web Design Lobby 1 10-11-2004 10:08 AM
Changing size of the form field Sonti Coding Forum 1 05-06-2004 02:42 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:52 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC