Do you need to open a thickbox window in the originating page from inside a thickbox window/iframe? (I know its confusing right? definitely pandoras box of thickboxes )
download the modified thickbox code
(Note I have not made a sample but can upon request)
Setup a normal thickbox link/page. For instance this link opens the first thickbox window in an iframe 650 wide by 400 tall.
//header information for test page
<link href="assets/css/thickbox.css" rel="stylesheet" type="text/css" />
<script src="assets/javascript/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/javascript/thickbox.js" type="text/javascript" charset="utf-8"></script>
<a href="FirstWindow.htm?=true&TB_iframe=true&height=400&width=650" class="thickbox" title="First Window">Open First Window</a>
Then setup the page that opens in the iframe window with the thickbox_iframe. It has been modified to open a new thickbox window in the iframes "Parent window".
By using this method the new window will replace the original window the user originally clicked on.
//header information for Second Window
<link href="assets/css/thickbox.css" rel="stylesheet" type="text/css" />
<script src="assets/javascript/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/javascript/thickbox_iframe.js" type="text/javascript" charset="utf-8"></script>
<a href="SecondWindow.htm?=true&TB_iframe=true&height=400&width=650" class="thickbox" title="second window">Open second Window</a>

0 comments:
Post a Comment