hi
i'm very newbie on javascript, but i came out with a script that puts the cursor at the upper left corner in a textarea.
Code:
<body onLoad="document.forms[0].elements['query'].focus()">
<textarea onFocus="this.select()" cols="60" rows="5" name="query">
But now i've a problem, since my web/php page has 2 forms.
i tried
Code:
<body onLoad="document.forms[1].elements['a'].focus()">
<textarea onFocus="this.select()" cols="60" rows="5" name="a">
,
but it gives an error, asking to debug...
How can i turn it around?