Discussions

Web tier: servlets, JSP, Web frameworks: XmlHTTPRequest post-back problem

  1. XmlHTTPRequest post-back problem (1 messages)

    posted Today 6:29 PM -------------------------------------------------------------------------------- I have a javascript function for a POST request from XMLHttprequest object: function lookup(field) { .... if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } var formdata = "ajaxreq=true"; req.Open("POST","directoryBrowser.jsp"); req.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); req.onreadystatechange = processXMLResponse; req.send(formdata); } This request is generated from within the directoryBrowser.jsp itself(on the keyup event of the searchField custom component). This post-back is not successful as it is not causing the decode method of the component to be executed. What is wrong?Does the POST url need to contain 'faces' in the URI too?
  2. Check The Capital O in Open method[ Go to top ]

    I guess u should use open instead of Open.Hope it should work.