Forum Moderators: open
dreaming of nascar
eg,
<form name=theform>
...
form fields
...
<A Href="javascript:document.theform.submit()">
<img of submitbutton mousey stuff>
</a>
</form>
Doing this your relying on people to have JavaScript enabled (most do) and have a modernish browser.
<span id="normalButton"><input type="submit" /></span>
<span id="fancyButton" style="display: none;">
<a href="" onMouseOver="someFunction()"
onMouseOut="otherFunction()"
onClick="document.thisForm.submit()">submit</a></span><script type="text/javascript">
var n = document.getElementById('normalButton');
var f = document.getElementById('fancyButton');if (n && f)
{
f.style.display = 'inline';
n.style.display = 'none';
}
</script>
The idea is to provide a normal button in case JS is turned off or unavailable (cell phone browsers come to mind), but if JS is there you can hide the basic button and display your fancy one instead.
[edited by: tedster at 5:48 am (utc) on Feb. 14, 2003]