Well technically no, not quirks. But yes something quirky. Um, the behavior in FireFox is correct. What do you expect to happen? I mean, if you continue to enter a bad image, it isn't suddenly going to become good. However, if circumstances were to change and a URL that previously pointed to a bad or missing image now points to a valid image, then it would go through. I'm not sure why there is a problem in Safari with the validate button not returning to a clickable state. The easiest thing for that would be to add a reset button to the form:
Code:
<input type="reset" value="Reset" onclick="this.form.elements.sub.disabled=false;return true;">
However, Safari may just need to have a timeout used to enable it to make the validate button clickable again, in other words - things may just be happening too fast for Safari.
Now, forget about Safari for a moment, if there is something else you would want it to do on the second attempt of a bad image, that could probably be arranged, but I would need to know specifically what that might be.
Added Later:
I figured out the problem in Safari. If the image object source (form.elements.imageURL.value
) is blank neither the onload nor the onerror functions fire. I 'fixed' that by forcing the onerror function to fire in that case. Be sure to refresh the page before trying a blank submission again in Safari. Of course, other behavior could be substituted. Perhaps the best thing in that case would be to not submit and to re-enable the validate button. It's really just a judgement call.
Bookmarks