|
From: Kunal C. <ma...@gm...> - 2012-04-12 10:43:43
|
Hi All, I am trying to run http-client:request method. but I am geting error. My file t1.xml I put at the same location from where my page is running. Following is my code. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"/> <script type="text/javascript" src="mxqueryjs.nocache.js"></script> <script type="application/xquery"> declare namespace http-client = "http://expath.org/ns/http-client"; declare updating function local:clickListener($loc, $evtLoc) { for $x in http-client:send-request ( <http-client:request href="t1.xml" method="get"/> )//* return insert node <p>{ $x/data(.) }</p> as last into b:dom()//body }; b:addEventListener(b:dom()//input[@id="myButton"], "onclick", xs:QName("local:clickListener")) </script> </head> <body> XQuery TRY !!!!! <input id="mytxt" type="text" value=""/> <input id="myButton" type="button" value="Print Name" /> </body> </html> Error : uncaught exception: com.google.gwt.core.client.JavaScriptException: (TypeError): c is null fileName: file:///C:/Users/user/Desktop/XQTry/DFD1E0C473F2869921678DD3A25DA6F6.cache.html Please give me a hint. Thanks in advance. Regards, -- *Kunal Chauhan* ma...@gm... [+918655517141] [+919904983614] |