LittleRed
09-30-2003, 04:22 AM
I've got a pop-up window which then opens a second pop-up, the first acting as the controller for the content in the second.
I've used a function in the first pop-up to work out the positioning and then open the second with
var variable_name=window.open( ...
and then in the <body> I've got my
onClick="variable_name.document.image_name.src=' ...
which doesn't work, because the 'variable_name' doesn't exist outside of the function. If I remove the 'var' it works fine, but I've heard that there are some problems with variables not declared using 'var' on some versions of IE (especially on Macs).
Is there a way to have the variable retained outside of the function?
thanks!
I've used a function in the first pop-up to work out the positioning and then open the second with
var variable_name=window.open( ...
and then in the <body> I've got my
onClick="variable_name.document.image_name.src=' ...
which doesn't work, because the 'variable_name' doesn't exist outside of the function. If I remove the 'var' it works fine, but I've heard that there are some problems with variables not declared using 'var' on some versions of IE (especially on Macs).
Is there a way to have the variable retained outside of the function?
thanks!