I’m having problems disabling an input button via JavaScript on my html form.
I’m using the following tag to create an html button with a specified image to display on my html form:
<input name=”postButton” type=”image” src=”./Post.jpg” onClick=”savePost()” disabled>
I have another text field on this html page that I want to enable the postButton when it loses focus via a call to a javascript function:
function enablePost(){
document.form.postButton.disabled=false;
}
But everytime the text field loses focus I get an IE error stating that the postButton object does not exist or is null.
But what I found is that if I change the input tag that defines my button to:
<input name=”postButton” type=”button” onClick=”savePost()” disabled>
The functionality works correctly, but then I lose my image source that I wanted.
Anyone know how to resolve this issue???