Hi,
It seems the focus() method is only used for the text, textare, checkbox and radio objects. I'm trying to give a button focus when the page is loaded but it does not seem to work. I'm getting an error telling me the button object does not exsist.
Any Ideas would be appreciated...thanks Mike
ERROR:
document.buttons.printButton is not object
CODE:
<HTML>
.
.
.
<SCRIPT>
document.buttons.printButton.focus();
</SCRIPT>
.
.
.
<FORM name="buttons">
.
.
.
<INPUT TYPE="button" VALUE="Print Button" NAME="printButton" ONCLICK="window.print()">
.
.
</HTML>
It seems the focus() method is only used for the text, textare, checkbox and radio objects. I'm trying to give a button focus when the page is loaded but it does not seem to work. I'm getting an error telling me the button object does not exsist.
Any Ideas would be appreciated...thanks Mike
ERROR:
document.buttons.printButton is not object
CODE:
<HTML>
.
.
.
<SCRIPT>
document.buttons.printButton.focus();
</SCRIPT>
.
.
.
<FORM name="buttons">
.
.
.
<INPUT TYPE="button" VALUE="Print Button" NAME="printButton" ONCLICK="window.print()">
.
.
</HTML>