I have an issue where I have 1 EO Dialog control on a page, and several client-side links that cause it to display. Each client-side call to showModelPopup (see below) pass's a URL which is eventually set by setContentUrl() and a caption set by setCaption(). Each page that is displayed by the dialog has a Cancel button which will close the EO Popup.
The problem is that when the EO dialog appears any time after the initial call, the dialog box first shows the previous page set by setContentUrl() before quickly changing to the correct page.
Here is an example of how we reproduce it:
1) Clicking a link which we'll say display's "page1"
Example: <a href="javascript:showModelPopUp('page1.aspx','page1');">page1 link</a>
2) "page1" is displayed fine and has a cancel button which when clicked calls page.parent.closePopUp() (see closePopUp() below). We click the cancel button which closes the dialog. Everything is fine.
3) Then click a second link which we'll say display's "page2".
Example: <a href="javascript:showModelPopUp('page2.aspx','page2');">page2 link</a>
4) Observe that for a half second, the EO Dialog appears showing "page1.aspx" for before then rendering "page2.aspx".
So my question is how can we have a single EO dialog on a page that
does not briefly display the previous content on subsequent calls to it? One solution we though of which we'd rather not do is to have one EO Dialog control in the ASPX for each client-side link that needs to display a dialog.
Please advise...
Below is some code samples take from our page:
Code: JavaScript
function showModelPopUp(url,title)
{
var dlg = eo_GetObject('Dialog1');
dlg.setContentUrl(url);
dlg.setCaption(title)
dlg.show(true);
}
function closePopUp()
{
var dlg = eo_GetObject('Dialog1');
dlg.close();
}
Code: HTML/ASPX
<eo:Dialog runat="server" id="Dialog1" ContentUrl="~/blank.aspx" SkinID="eoPopWindow" InitialState="Hidden" />
<a href="javascript:showModelPopUp('forgotpassword.aspx','Forgot Password ?');">Forgot My Password</a>
<a href="javascript:showModelPopUp(changepassword.aspx','Change Password ?');">Change Password</a>