Hi everyone, i’ve been working on a project here of late, and I took a break from it and came back to it today. It’s a fairly simple AJAX script but now i’m getting two errors
Error: uncaught exception: [Exception… “Access to restricted URI denied” code: “1012” nsresult: “0x805303f4 (NS_ERROR_DOM_BAD_URI)” location: “box.js Line: 28”]
and
Security Error: Content at
I don’t know what they mean and I can’t find any sort of error around line 28. I was hoping someone could help me:
[CODE]function preprecords()
{
if(notsaved==true)
{
var answer=confirm(“Save changes to current record?”)
if(answer)
{
fromprep=true;
saveit();
}
if(!answer)
{
runload();
notsaved==false
}
}
if(notsaved==false)
{
runload();
}
}
function runload()
{
var url = “http://recorded-live.com/fitness/scripts/recordloader.php”;
/* Place “Opening Record” Message here */
/* Passing variables lastname and first name to PHP */
http.open(“GET”, url, true);
http.onreadystatechange = handleHttpResponseOpen;
http.send(null);
}
function handleHttpResponseOpen()
{
if (http.readyState == 4)
{
resultsuser = http.responseText;
/* On php script completion print script result in response div */
if(resultsuser == “”) resultsuser = “”;
document.getElementById(‘stdname’).innerHTML = resultsuser;
// evaluate javascript
scriptTag='(<script.*?>)((n|r|.)*?)(</script>)’;
if (scripts=resultsuser.match(scriptTag)) {
// remove slashes
scripts[2]=scripts[2].replace(/\/g,””);
//run scripts
eval(scripts[2]);
}
}
}
function getHTTPObjectUser()
{
var xmlhttp;
if (!xmlhttp && typeof XMLHttpRequest != ‘undefined’)
{
try {xmlhttp = new XMLHttpRequest();} catch (e) {xmlhttp = false;}
}
//KILL HERE
//END KILL
return xmlhttp;
}
var http = getHTTPObjectUser();
function showBox(){
document.getElementById(“overlay”).style.display=”block”;
document.getElementById(“box”).style.display=”block”;
}
function hideBox(){
document.getElementById(“overlay”).style.display=”none”;
document.getElementById(“box”).style.display=”none”;
}