Skip to content Skip to sidebar Skip to footer

Invalid_state_err: Dom Exception 11 When I Execute The Req.open("get",url,true);

Thanks, resolved one issue, this is the next. As a novice at this, I am still getting an error and the simple application is not working. I get INVALID_STATE_ERR: DOM Exception 11

Solution 1:

The answer to the question is that the DOM exception 11 error occurred when the ajax command was sent to an improper location with the req.open command. This happenned because the servlet was in the root directory of the eclipse created tomcat instance. When the ConvertToDecimal function's req.open("Get",url,true); call value for url was changed to remove the prefixed / character, all worked. The url variable was changed to: var url = "AjaxResponseServlet?key=" + escape(key.value); Alternatively, the url variable also works with: var url = "/Ajax2/AjaxResponseServlet?key=" + escape(key.value); The web.xml file was not changed at all from its current value for servlet-mapping of: <servlet-mapping> <servlet-name>AjaxResponseServlet</servlet-name> <url-pattern>/AjaxResponseServlet</url-pattern> </servlet-mapping>

Note, also, when you get an error on your browser on line 1, column 1 and you are doing ajax communication, very well could be a response not being handled that is not an html file.

Post a Comment for "Invalid_state_err: Dom Exception 11 When I Execute The Req.open("get",url,true);"