Click to See Complete Forum and Search --> : Permission Denied. Why?


stualk
02-16-2004, 05:16 AM
Hi folks,

Got a problem with some java script. I'm getting the error message "Error. Line 1: Permission denied" for the following script...

if (parent.location.href == self.location.href){
// change the url below to the url of the
// frameset page...
window.location.href = 'index.htm'
}

Does anyone know why this might be?

Cheers

fredmv
02-16-2004, 05:45 AM
Is the page you're referencing on the same domain?

stualk
02-16-2004, 05:50 AM
Yes, it's actually in the same folder as well. The code does exactly as it should when I try to access the page outside of the frameset...it reidrects to index.htm. But when I try to access it as part of the frameset it only allows me to view the page after the error box and has been cancelled. It hasn't affected the functionallity of the site other than the annoying error box, which I'd like to get round if possible.

Cheers