|
Rank: Newbie Groups: Member
Joined: 2/21/2012 Posts: 5
|
I have two questions. I am loading a dialog window with javascript on the client side. This is causing this page to basically add to the browser history.
Meaning after the dialog is closed the user now needs to hit the back button three times to go back to the previous page. Is there a way to avoid this problem.
My next question is when the user clicks the default window close button at the top right part of the window. You know the little X. Is is possible to run client code from an event tied to that?
I tried using the following events but none of them are triggered when this button is clicked.
ClientSideOnCancel ClientSideOnEnd ClientSideOnUnload
|
|
Rank: Newbie Groups: Member
Joined: 2/21/2012 Posts: 5
|
I noticed this problem seem to be caused by setting the contenturl. I have not found a workaround yet. Please help
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There is no way to get around the browser history problem as long as you use ContentUrl.
The little X should trigger both ClientSideOnCancel and ClientSideOnEnd. Note both property takes function names. It's just the name of the function. If you still have problem with that, you can try to create a small test page to demonstrate the problem and post it here. We will be happy to take a look as soon as we have it.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/21/2012 Posts: 5
|
Thank you for the quick answer. I thought that may be the case. Without going through all the possible scenarios can you tell me if it this is possible to overcome by placing the content within a iframe inside the dialog and setting the source of the iframe via javascript before the dialog loads. i.e. something like this:
<a href="javascript:showme()">Show Dialog</a>
<script>
function showme() { dlg = eo_GetObject('Dialog1'); document.getElementById("myiframe").src = "jcara.aspx?userid=139395" dlg.setCaption("<table width=100% bgcolor=blue cellspacing=0 cellpadding=0><tr><td align=center><font color=white>Gallery for - " + username + "</font></td><tr><table>") dlg.show(true);
}
When the above example was tried it no longer made me click the back button three times but it still made me do it twice before it went back to the previous page. So I was no longer using the content URL but it still seems to affect the browser history for some reason.
As far as the other other issue I got that one solved it was nothing more than a stupid typo LOL.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You should be able to use that fine. The dialog is a container. You can put anything inside it and what you placed inside the dialog would not have anything to do with the dialog.
Thanks
|
|