PDA

View Full Version : Button not selected.


Morgoth
08-15-2002, 04:17 PM
If you make a brand new site, and had a submit button somewhere inside. You can see that the button is auto selected.
(Selected: The button stands out a bit more then the others)

You can see this in the example.

Example:

<html>
<br>
<input type="button" value="Test1">
<br>
<input type="button" value="Test2">
<br>
<input type="button" value="Test3">
<br>
<input type="button" value="Test4">
<br>
<input type="submit" value="Test5">
<br>
</html>



Now, my question is:
Is there away I can make the submit button, nor any other button on my site, automatically be selected when the site is loaded?
Is there a tag I am missing inside of the submit button that I could add, or maybe a hidden button that will take it's place and wont mess up the tables or design of my site and not be visable?

I really need this, and I can't think of anything.
Thank you very much.

Lee Brenner
08-15-2002, 04:43 PM
Well, if your buttons are inside a form then the submit button will not show up selected until you enter the form.

Morgoth
08-15-2002, 06:22 PM
Worked... Thank you.

boxer_1
08-15-2002, 08:00 PM
I know the issue has been resolved, but just for the sake of the topic here's a way you can specify which button receives focus when the page loads:

<html>
<head>
<title>Example</title>
</head>
<body onLoad="document.myForm.b3.focus()">
<form name="myForm">
<input name="b1" type="submit">
<br />
<input name="b2" type="submit">
<br />
<input name="b3" type="submit">
<br />
<input name="b4" type="submit">
<br />
<input name="b5" type="submit">
<br />
<input name="b6" type="submit">
<br />
</form>
</body>
</html>

Morgoth
08-15-2002, 11:09 PM
You must be the only person in the world to name their submit buttons.

:)