Matthew,

I don't have a field name. I only have one field on my HTML pages, which is the 
search box. This is my Form:
|
  <form method="get" action="#" onsubmit="highlight(this.highl.value);return 
false">
<input type="text" id="highl" />
<input type="submit" value="Search this Page" /><br />
</form>
|
How do I make the cursor default to the search box? Where would I put the 
document.getElementById('myfield').focus(); line in my HTML code? Can I add it 
to this code:
|
<body onLoad="beginSearch ()">
|
Help?


Paul Hanson
Technical Writer
RoboHelp ACE - http://www.adobe.com/support/forums/team_macromedia/robohelp.html
Quintrex Data Systems http://www.quintrex.com<http://www.quintrex.com/>
email: phanson at quintrex.com



________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Pennell


Do you mean you want to automatically give focus to a particular form field 
when the page loads? You can simply call the .focus() method on the element:

document.getElementById('myfield').focus();

Consider the accessibility implications, first, though; not everyone will be 
happy to have decisions made for them about where they want their cursor to be. 
;)

- Matthew.


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to