I have a js file called makeIframeModal.js . Normally when i try to create an iframe, is use the iframe tag in jsp like this :
<iframe id="myIframeId" style="display:none;" height="430" width="675" src="myjsp.jsp" ></iframe>
Now makeIframeModal.js contains the iframe description like this :
iframemodal = new modal($('framebtn'), {
afterOpen : function(){$$('.close a').invoke('observe','click',function(e){modal.close(); Event.stop(e);});},
opacity: 0.3,
width: 675,
fade: true,
fadeDuration: 0.1,
autoOpenIfLinked: false
});
So , my iframe opens up in a pop up. Now I have a link in this iframe, which when clicked will close the iframe. This i am doing like this :
function closeMyIframe()
{
var parentDynamicDiv = window.parent.document.getElementById('dynamic_id1');
var iframe = window.parent.document.getElementById('dynamic_id2');
iframe.style.display = 'none';
parentDynamicDiv.style.display = 'none';
}
However, now i need to open up another iframe called myNewIframeModal.
So in short: When i close the first iframe another iframe must open up in a pop up automatically. How can achieve I this functionality ? Kindly help me .
you can call the new modal inside the closeMyframe…