Hi Everyone
I hope I find you well this beutiful day.
I have two dialog modal popups that I want the webpage to refresh on when the dialogs are closed. The code I am using looks something like this:
<div data-role="dialog" id="dialog1" class="padding20" data-close-button="true" data-overlay="true" data-overlay-color="op-dark" width="1000px" height="400px">
<h2>Heading</h2>
<div class="img-src">
<iframe src="videos/player/vid.html" width="1050px" height="325px" id="iframe1" scrolling="no"></iframe>
</div>
</div>
<div data-role="dialog" id="dialog2" class="padding20" data-close-button="true" data-overlay="true" data-overlay-color="op-dark" width="1000px" height="400px">
<h2>Heading</h2>
<div class="img-src">
<iframe src="videos/player/vid2.html" width="1050px" height="325px" id="iframe2" scrolling="no"></iframe>
</div>
</div>
The Javascript I have to close one of these boxes looks a bit like this:
<script type="text/javascript">
function refresh()
{
var x=document.getElementById("iframe1").src;
document.getElementById("iframe1").src=x;
}
</script>
So that will close iFrame 1 down find, no issues.
I then put in the code:
<script type="text/javascript">
function refresh()
{
var x=document.getElementById("iframe2").src;
document.getElementById("iframe2").src=x;
}
</script>
Neither of the iFrames will now refresh when I close the dialogs down.
I have tried it with just iFrame2 and that works. It's just when both of these scripts are in it isn't happy.
Does anyone know how I can achieve how to refresh the pages when either of the dialogs are closed. Any help would be appreciated.