Link to home
Start Free TrialLog in
Avatar of 1pc
1pc

asked on

Javascipt Highslide - Different iframe popups

I'm using the highslide-full.js In the head.
The link on 'Page basic' opens a popup 'detail' around the div 'HStarget' without any problem. In the popup 'detail' a link opens a new popup 'modifie'. This new popup opens without any problem.
But my problem is: I want to close the second popup 'modfie' while updating the popup 'detail'. How can I return from popup 'modfie' to popup 'detail' with new elements of the form on popup 'modfie' ? I've tried sevreal methodes like hs.getExpander(id), target="reff_it',.. without any results..
// page basic 
<table><tr>
<td width="200"><a href="#" onclick="return hs.htmlExpand(this, {objectType: 'iframe', maincontentId: 'reff_it', preserveContent: true, targetX: 'HStarget 5px', targetY: 'HStarget 5px', allowMultipleInstances: false, width: 400, height: 300, src: 'detail.php?id=<?= $id ?>' } )"> detail </a></td>
<td><div id="HStarget">&nbsp;</div><td>
</tr></table>

// popup detail
<a href="#" target="_blank" onclick="parent.window.focus(); return parent.window.hs.htmlExpand(this, {objectType:'iframe', width: 500, height: 400, src: 'modfie.php?id=<?= $id ?>&value=<?= $value ?>' })\"> to page modifie in a new popup </a>

// popup modifie
<a href="#" onclick="return hs.htmlExpand(this, {objectType: 'iframe', targetX: 'HStarget 5px', targetY: 'HStarget 5px', allowMultipleInstances: false, width: 400, height: 300, src: 'modfie.php?id=<?= $id ?>&value=<?= $value ?>'  } )\"> close this and return to popup detail </a>

Open in new window

Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

1) when you opened two popups

var modfile = window.open("modfile");
var detail = window.open("detail");

2) after this you need to store these 2 variable values somewhere in the parent window.

3) Then from one of the windows, you need to access the parent window's form and take the reference (stored previous) to the other window.

4) Using this reference you can then close, refresh etc the other window

thanks
Avatar of 1pc
1pc

ASKER

Thx, the problem seems to find the target.
There must be a way to determinate a specific name (id) to this popup, so that the other popup can link something to this popup?
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial