I need to use the CPAINT2 AJAX toolkit to get data from the server. I tried using the following:
function loadXMLDoc()
{
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)
{
document.getElementById("overlay_info_contents").innerHTML=xmlhttp.responseText;
alert("yes this is active!");
}
}
xmlhttp.open("GET","http://ceruleansin.byethost3.com/gallery/libraries/ajax_info.txt",true);
xmlhttp.send();
}
I think the problem is that because CPAINT2 already has a xmlhttp.onreadystatechange I can't capture my own.
So, how do I use CPAINT2 to request my "ajax_info.txt" file?
you just have to create a new cp function (js), and call it from somewhere. you have to also create a php function witht he same name in the /libraries/general.functions.php. try to follow the same format i use, in the function you can chage it to use XML.
check the example for setgalleries() and updateGalleries() in the ajax.functions.js file.
more information here: http://cpaint.sourceforge.net/
It looks like you're new here. If you want to get involved, click one of these buttons!