View Full Version : Can anyone tell me why this is doing this??

06-02-2004, 12:07 PM
Hi all.

Could someone have a quick glance over this and tell me if there's any reason I get the following behaviour - I've got this bit of script in a form submission table on my site, and every time I hit the "submit" button, I get a script error.

However, if I change "javascript:document.details.submit" to "javascript:document.details.reset" then it works fine.

I've got the same bit of script on another button in another area on the site, and that also works fine, so I'm a bit baffled.

<td valign="top" class="style2"><a href="javascript:document.details.reset();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('clearform1','','Flash/clearform_On.gif',1)"><img src="Flash/clearform_Off.gif" alt="Reset Form" name="clearform1" width="104" height="77" border="0" id="clearform1"></a></td>
<td><a href="javascript:document.details.submit();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','Flash/submit_On.gif',1)"><img src="Flash/submit_Off.gif" alt="Submit Details" name="submit" width="85" height="77" border="0"></a>

Thanks if anyone can help here. Maybe I cant see the wood for the trees.


Willy Duitt
06-02-2004, 12:16 PM

<input type="image" src="Flash/submit_Off.gif" name="submit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','Flash/submit_On.gif',1)">

06-02-2004, 01:03 PM
Ah! Top banana!

Thats solved it,thanks a lot.