Click to See Complete Forum and Search --> : Text box and cursor in it (netscape)


mazy
09-09-2004, 01:37 AM
I want my text box to be active, with the cursor in it, right after page loads up. I am using:
...
<body ..blah blah.. onLoad="focus();convert.number.focus()">
...
<form method="post" action="index.php" name="convert">
<p>Enter your number: <input type="text" name="number">
...

It works just fine with IE BUT it does not work with Netscape for some reason. You can check it out here http://www.converter.staronki.com/ Any thoughts?
Thanks much.

fredmv
09-09-2004, 01:48 AM
Welcome to the forums.onLoad="focus();convert.number.focus()"Becomes:onload="document.forms['convert'].elements['number'].focus()"

mazy
09-09-2004, 02:00 AM
Thanks fredmv :0)
works great! now I'll be able to fall asleep, finally..
thank you indeed