onchange
event won't get called when the input is changed and ENTER
is hit. Apparently IE6 doesn't think it needs to.This bug doesn't happen in Firefox, nor it happens if you're trying to use onblur. Try it:
<form onsubmit="alert('submit')">Update: I apologize for not posting a workaround. You can add an event which forces the input to blur (without having to explicitly define which input):
<input onchange="alert('change')" onblur="alert('blur')" />
</form>
<form onsubmit="window.focus()">
Having a problem with this "null or not an object" JS error msg...here is the function that I am using:
ReplyDeletefunction sendXML() {
var esrimapBlurb = "/esriconn/esri";
var theService = "?ServiceName=" + theServiceName;
var cVersion = "&CustomService=" + customService + "&ClientVersion=3.1";
var theForm = "&Form=True";
var actionURL = "http://" + hostName + esrimapBlurb + theService + cVersion + theForm;
var thePostFormOBJ = parent.PostFrame.document.forms[0];
alert(thePostFormOBJ);
//alert(actionURL);
thePostFormOBJ.action = actionURL;
thePostFormOBJ.ArcXMLRequest.value = theRequest;
thePostFormOBJ.JavaScriptFunction.value = "parent.MapFrame.processXML";
thePostFormOBJ.submit();
}
It error get thrown at the line where the var thePostFormOBJ is declared. I just don't understand why it ins't working...any help would be most appriciated...
Mark
It's difficult to determine where errors come from just by looking at the code. I strongly suggest that you use a debugger like Venkman (for firefox - free) or if you have MS Office that you install the script debugger, which is excellent.
ReplyDeleteAnother alternative, a bit more lighweight, is the Firebug plugin for Firefox. You should be testing each of the tokens in the line that is throwing the error, to know what is null. Is it because there's no PostFrame in the parent window? Is it because it hasn't loaded anything, so "document" is not available? etc.
Thanks for the quick response...this error is rather generic and tough to work thorugh for a newbie like myself...I will give your suggestions a shot. Thank you for your time.
ReplyDelete