I'm trying to code where there's an image of a Submit button, when clicked the button will change to Working and validate my page. I preloaded all the images ahead of time but when I clicked on the Submit button, the Submit image goes away but the Working image does not appear quick enough. A section of the code is below, please let me know what how I can do this. Thanks,
btw, I have to use type="image" for this page. Thanks,
<script>
.
.
submit = new Image();
submit.src = 'submit.gif';
working = new Image();
working.src = 'working.gif';
function validate(form,submitButton) {
if (working == false) {
image1.src="working.gif";
working = true;
theForm.modify.value="no";
return true;
} else {
return false;
}
</script>
<body>
.
.
<input type="image" name="submitButton" alt="Submit" src="submit.gif" border=0>
.
.
</body>
btw, I have to use type="image" for this page. Thanks,
<script>
.
.
submit = new Image();
submit.src = 'submit.gif';
working = new Image();
working.src = 'working.gif';
function validate(form,submitButton) {
if (working == false) {
image1.src="working.gif";
working = true;
theForm.modify.value="no";
return true;
} else {
return false;
}
</script>
<body>
.
.
<input type="image" name="submitButton" alt="Submit" src="submit.gif" border=0>
.
.
</body>