rfr1tz
asked on
can't write into frame
I open a web page containing two frames - the frame names are "top" and "bottom".
From the page in the "top" frame, I open a new dialog (using javascript window.open). The user clicks on a button in that dialog, and I want to open a page in the "bottom" frame of the original window.
I've tried my usual - parent.frames['bottom'].do cument.loc ation = "the url I want to display in the frame".
But this didn't work.
Maybe window.open creates another parent?
In any case, can anyone tell me how to aim a URL at that bottom frame?
From the page in the "top" frame, I open a new dialog (using javascript window.open). The user clicks on a button in that dialog, and I want to open a page in the "bottom" frame of the original window.
I've tried my usual - parent.frames['bottom'].do
But this didn't work.
Maybe window.open creates another parent?
In any case, can anyone tell me how to aim a URL at that bottom frame?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, that's my bad. Cd, you're right ;)
Regards...
Regards...
And if that fails it is because you have named your frame using the reserved property name top. Probably a good idea to change it no matter what you do, because sooner or later it will jump up and bite you.
Cd&
Cd&
ASKER
Good point Dino. But actually I didn't name it 'bottom' - that was just for illustration.
Actually the reserved name is _top, with the underscore, is it not ?
It seems to be like that in links, like _self, for example, but if look at any frame breaking code in Javascript:
top.location=self.location
Apparently, in Javascript, you take away the underscore. In any case, Cd's frames[] array part should fix it fine and dandy
top.location=self.location
Apparently, in Javascript, you take away the underscore. In any case, Cd's frames[] array part should fix it fine and dandy
Yes, you would do parent.parent.frames['bott
Regards,
Zyloch