Post XML String data without a Form
Is it posseble to post the XML string data without a form, I am trying the below script without much luck?
-------------------------------------------------------------------------------------------------
<script type="text/javascript">
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
else // Internet Explorer 5/6
{
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
var url = "http://creator.zoho.com/api/xml/read/apikey=[APIKEY]&ticket=[Ticket]
";
var XMLString = "<ZohoCreator>
<application name="loadsoft_database">
<form name="Software_Features">
</form>
</application>
</ZohoCreator>";
xhttp.open("POST",url,true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function()
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}
}
xhttp.send("XMLString");
-------------------------------------------------------------------------------------------------