|
Post by johnwhitham on Sept 24, 2013 15:13:28 GMT
I'm trying a “Hello world” exercise with XML and have hit a problem.
I have a textinput (id input1) a textbox (id text1) and a button with the following code attached:
OpenXMLUrl("http://www.john.whitham.me.uk/hippo/first.php?request="+InputGet("input1"), Result); function Result(XML){ if(XML.status==200){ if(XML.documentElement.nodeName=="response"){ TextBoxSet("text1",XML.documentElement.firstChild.firstChild.nodeValue); } }else{ alert(XML.status+" Error!!!"); } } This works perfectly in the embedded viewer (versions 2 and 3) but when deployed to the server the xmlhttp object is null. Tested in IE and Chrome.
|
|
|
Post by johnwhitham on Sept 24, 2013 17:55:11 GMT
Oops, sorry. Please ignore the preceding, I had forgotten to set the header type to XML in the PHP side of the transaction. All works fine now.
|
|
|
Post by Hippani on Sept 24, 2013 21:18:39 GMT
Excellent
|
|