PDA

View Full Version : Popup window issue with multiple directories



jenfuji606
13 Jan 2011, 04:39 PM
I have a .js file with my popup script in it linked in a header include.

The popup works fine on the page that is one directory down, but not on the page that is 2 directories down.

Works fine in (using generic folder names):

root > folder1 > index.html

but not in:

root > folder1 > folder2 > index.html

The script I am using is as follows:

var win = null;
function popUp(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(url,winName,settings)
}

I think it has something to do with how the script file is linked, but I haven't been able to find a solution.