I need to update HTML div content and a JavaScript function to be called with specific parameters retrieved via AJAX after the AJAX request completes. Is this possible in one AJAX call?
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
callback(); //execute my callback function!!!
}
}
Your HTML will be inside the xmlhttp.responseText.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments