0

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.

2
Contributors
2
Replies
15
Views
1 Year
Discussion Span
Last Post by TexWiller
0

OK, I sussed it, the javascript used is:

    <script type="text/javascript"> 
    function refresh() 

    { 
    var x=document.getElementById("iframe1").src; 
    document.getElementById("iframe1").src=x; 

    var y=document.getElementById("iframe2").src; 
    document.getElementById("iframe2").src=y; 
    } 
    </script> 
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.