|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[solved] cross window scripting
hi experts,
i have a frameset with top, main and bottom frame. a link in the bottom frame opens a popup. the popup contains a link. what i want this link to do is open a page in the main frame of the window below the popup and close the popup. how can this be done? Code:
<a href="javascript:;" onclick="opener.location='http://www.domain.com/page.htm';self.close()">Link</a> the code above doesnt work as it opens the page in the bottom frame (the opener location) another possibility would be that the link in the popup replaces the frameset in the window below with another frameset and closes the popup. (something like target="_top" in javascript) any help would be appreciated. (dont flame me because of the use of frames and popups - it is not my site, i´m just trying to help a buddy out with this problem. the whole website is huge and cant be recoded) thanks in advance, jogol Last edited by jogol : February 2nd, 2005 at 10:03 AM. Reason: problem solved |
|
#2
|
|||
|
|||
|
Hi!. This is probably not for me (I'm not an expert) I read somewhere you have a parent object (like a document object that references the parent window) If so, you'd have:
window with frames --> frame --> popup May be you can reference with parent the window with frames and use the location.href property (with the right target also). If not...sorry, I tried my best to help you!! Anibal. |
|
#3
|
|||
|
|||
|
thx for your help. the solution is to add .parent in order to replace the whole frameset
Code:
<a href="javascript:;" onclick="opener.parent.location='http://www.domain.com/page.htm';self.close()">Link</a> loading a page in main frame works this way: Code:
<a href="javascript:;" onclick="opener.parent.frames['main'].location='http://www.domain.com/page.htm';self.close()">Link</a> greetz |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > cross window scripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|