Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: useful piece of info - javascript security


Message #1 by ertoz@c... on Wed, 27 Jun 2001 15:46:33
i posted a message recently (which i appended below) about not being able 
to access the variables of the opener window from the child (contents of 
the child are written by a cgi) and vica versa. It turns out that NT 
allows the access but ME and 98 does not. I found the cause of the 
problem. I was specifying absolute url's. Even if the absolute url's are 
from the same location the browser does not perform a check to see if 
they're from the same site. Using relative url's did the trick. 

I'm posting this message in case someone might make use of it someday. (it 
took me 2 days to figure this out and i don't want anyone else to waste 
their time on this one).

levent

>i'm trying to use 'opener' to access the variables and functions of the 
>parent(opener) of a popup window. it doesn't work on win98. it seems to 
>work on NT. it doesn't work on windows ME. when i 
>alert(opener.top.length) 
>it tells me the correct number of frames in the main page (3). when i try 
>to alert(opener.i) it tells me "access denied" which is a different error 
>message than the one you get when the variable with that name doesn't 
>exist.

>i tried lowering down the security settings for my computer but it did 
>not help. anyone have any ideas about this one?


  Return to Index