How to call Zoho Recruit "addRecords" API and pass xmldata
Can't get the code below to successfully make the API call. I have Javascript and php to work with. When I make the call to "req.open" I never come back and the next "alert" command never executes. What happened? Is this the proper way to make the API call? A little help please with the code (html,javascript, php ) enabling me to effectively call the API. Thanks very much once again.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
</body>
<script>
var req = new XMLHttpRequest()
req.open('GET', 'https://recruit.zoho.com/ats/private/xml/JobOpenings/addRecords?authtoken=e198b8f4d7f50bf48e98e2b2571e5e77&scope=recruitapi&xmlData=<JobOpenings>
<row no='1'>
<FL val='Posting title'>" . $_POST['job_title'] . "</FL>
<FL val='Client'>" . $_POST['client'] . "</FL>
<FL val='Assigned recruiter'>" . $_POST['recruiter'] . "</FL>
<FL val='Client manager'>" . $_POST['manager'] . "</FL>
<FL val='Job opening status'>" . $_POST['status'] . "</FL>
<FL val='Number of positions'>" . $_POST['openings'] . "</FL>
<FL val='Country'>" . $_POST['country'] . "</FL>
<FL val='Roles and responsibilities'>" . $_POST['roles'] . "</FL>
</row>
</JobOpenings>', false);
alert("just after open:",req.status);
</script>
</html>