jhodgski
04-06-2007, 10:57 AM
I am getting this error in Firefox:
There was an error on the page.
Error: uncaught exception: permission denied to call method Location.toString
URL:
Line: 0
The page actually loads fine when I access the url directly with any browser. But when I use a url that redirects to the page, I get the above error.
The code it arises from seems to be:
var newwindow = '';
//this function creates a popup, using any existing popup window
function popup(url) {
if (newwindow && !newwindow.closed && newwindow.location) {
newwindow.location.href = url;
}
else {
var widthAdjust = 16;
var heightAdjust = 18;
var windowWidth = 778 + widthAdjust;
var windowHeight = 526 + heightAdjust;
var leftPos = (screen.width / 2) - (windowWidth / 2);
var topPos = (screen.height / 4) - (windowHeight / 4);
var winfeatures="width=" + windowWidth + ",height=" + windowHeight + ",scrollbars=1,resizable=0,toolbar=0,location=0,menubar=0,status=1,directories=0,top=" + topPos + ",left=" + leftPos;
newwindow=window.open(url, 'foodwise_start', winfeatures);
if (newwindow && !newwindow.opener) {
newwindow.opener = self;
}
}
if (window.focus && newwindow) {
newwindow.focus();
}
return false;
}
The error message is presented exactly once for each flash object that is on the page, so it's clearly flash-related.
Has anyone else experienced this or know how to solve?
Thanks,
James
There was an error on the page.
Error: uncaught exception: permission denied to call method Location.toString
URL:
Line: 0
The page actually loads fine when I access the url directly with any browser. But when I use a url that redirects to the page, I get the above error.
The code it arises from seems to be:
var newwindow = '';
//this function creates a popup, using any existing popup window
function popup(url) {
if (newwindow && !newwindow.closed && newwindow.location) {
newwindow.location.href = url;
}
else {
var widthAdjust = 16;
var heightAdjust = 18;
var windowWidth = 778 + widthAdjust;
var windowHeight = 526 + heightAdjust;
var leftPos = (screen.width / 2) - (windowWidth / 2);
var topPos = (screen.height / 4) - (windowHeight / 4);
var winfeatures="width=" + windowWidth + ",height=" + windowHeight + ",scrollbars=1,resizable=0,toolbar=0,location=0,menubar=0,status=1,directories=0,top=" + topPos + ",left=" + leftPos;
newwindow=window.open(url, 'foodwise_start', winfeatures);
if (newwindow && !newwindow.opener) {
newwindow.opener = self;
}
}
if (window.focus && newwindow) {
newwindow.focus();
}
return false;
}
The error message is presented exactly once for each flash object that is on the page, so it's clearly flash-related.
Has anyone else experienced this or know how to solve?
Thanks,
James