Hi!
On my page, a user will click on an image which sends data to an ajax script which in turn sends a variable to a PHP script on another page. Ajax gets the response and replaces a DIV's content with that PHP's page's content. It will work except for the fact that jQuery won't load for that PHP page.
JS Function:
Code:
function wearitem(name) {
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
var response=xmlhttp.responseText;
document.getElementById("loadoutdisplay").innerHTML=response;
}
}
xmlhttp.open("POST","loadout.php?wear="+ name,true);
xmlhttp.send();
}
The PHP page is just pure PHP and HTML, there isn't any Javascript. All the JS stuff is on the page of the JS function above.
Thanks in advance and let me know if you need any more info.
-M2com
Bookmarks