Andrew said:
Hi,
Try this....
<script>
function activatebutton(){
buttonoff.style.display='none';
buttonon.style.display='inline';
}
</script>
<body onload="activatebutton()">
<div id="buttonoff" style="display: inline">
<img src="../images/buttonimg.gif">
</div>
<div id="buttonon" style="display: none">
<a onclick="dosomething()"><img src="../images/buttonimg.gif"></a>
</div>
</body>
Hope this helps
And if they have JavaScript disabled the function would be better
described as donothing()!
Far better to to use JavaScript as a precheck...have a variable that is
initially set as false, then attach to onload event to reset to true.
Trap the submit of form to check if variable is true or not to allow or
cancel the submit action. But you should *always* do a final check of
all submitted data server-side with receiving script. With this method
if JavaScript is disable the form will still submit, but the server-side
script will catch the missing data error.