jsf - TypeError: element.selectNodes is not a function at Object.A4J.AJAX.XMLHttpRequest.getElementsByTagName -
i have maintain existing enterprise web application based on jsf 1.1 , ajax4jsf. want add asynchronous standard validation existing input field using <a4j:support>
. boils down below code snippet:
<%@ page contenttype="text/html; charset=iso-8859-1" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>my validate test</title> </head> <body> <f:view> <h:form> <h:inputtext value="42" id="fooinput" required="true"> <a4j:support event="onchange" rerender="foomsg" immediate="true" ajaxsingle="true"/> <f:validatedoublerange minimum="10" maximum="500"/> </h:inputtext> <h:message for="fooinput" id="foomsg" style="color: red;"/><br/> <h:inputtext value="bar" id="barinput"> </h:inputtext> </h:form> </f:view> </body> </html>
but ajax request not fired. following js error thrown:
typeerror: element.selectnodes not function @ object.a4j.ajax.xmlhttprequest.getelementsbytagname (https://localhost/myfooapp/a4j.res/org.ajax4jsf.framework.ajax.ajaxscript.jsf:32:19) @ object.a4j.ajax.xmlhttprequest._appendnewelements (https://localhost/myfooapp/a4j.res/org.ajax4jsf.framework.ajax.ajaxscript.jsf:43:389) @ object.a4j.ajax.xmlhttprequest.appendnewheadelements (https://localhost/myfooapp/a4j.res/org.ajax4jsf.framework.ajax.ajaxscript.jsf:43:185) @ object.a4j.ajax.processresponse [as onready] (https://localhost/myfooapp/a4j.res/org.ajax4jsf.framework.ajax.ajaxscript.jsf:57:731) @ xmlhttprequest._request.onreadystatechange (https://localhost/myfooapp/a4j.res/org.ajax4jsf.framework.ajax.ajaxscript.jsf:20:25)
i have tried change both "immediate" , "ajaxsingle" attribute, did not change anything. ajax request not fired. other ajax4jsf features in web application seem work. problem , how can solve it?
Comments
Post a Comment