Jump to content

Problems with focusing on a form element...


almightyegg

Recommended Posts

I've used this exact code before yet it refuses to work.

 

Here's my javascript:

<body onLoad="document.form1.contact.focus()">

 

here's the form:

<form action="send.php" method="POST" name="form1">
<table border="0">
<tr><td width="100"><b>To</b></td><td><input type="text" id="tokenize" name="contact" /></td></tr> <!--this is the form element I'm trying to focus on... but ti doesn't work. Perhaps it's because it has other javascript working on it too? though I didn't think that'd effect it-->
<tr><td> </td><td></td></tr>
<tr><td><b>Subject</b></td><td><input type="text" name="subject"></td></tr>
<tr><td> </td><td></td></tr>
<tr><td><b>Message</b></td><td></td></tr></table>
<center>
<input type=button value='Bold' onclick="aaatml(1);"><input type=button value='Italics' onclick="aaatml(2);"><input type=button value='Underline' onclick="aaatml(3);"><input type=button value='Strikethrough' onclick="aaatml(6);"><input type=button value='Link' onclick="aaatml(4);"><input type=button value='Image' onclick="aaatml(5);">
<br>
<textarea id="colorBox" name="desc" style="width: 450px; height: 190px;"></textarea><br>
</center>
<input type="submit" value="Send">
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.