I am using the following script to to load pages of my site:
var xhr;
function Ajax(afile,adiv,arun,loader) {
// Loading info
if(loader==null) { gi("loaderdiv").style.display='inline'; }
// Process Ajax
var htm = afile.split('?');
var xhr = $.ajax({
type: "GET",
url: htm[0],
data: htm[1],
cache: false,
success: function(html){
gi("loaderdiv").style.display='none';
$(gi(adiv)).fadeIn(100);
$('#'+adiv).html(html);
}
});
// Set global process ID
window['xhr'] = xhr;
}
This script works fine - most of the time. Unfortuntately it sometimes happens that the script will redirect to the link instead of loading it into the div. When that happens, the following script error occures:
attempt to run compile-and-go script on a cleared scope jquery.js line: 16
I really hope someone can help.
Thank you
It sounds like you might be rendering a script that is received from the page you are acquiring via ajax.
Try to put a breakpoint on the success function in your ajax request, and see what's coming back. Look for javascript, or something that might cause the page to redirect...
Facebook was doing the redirect due to lack of session in facebook.php