Welcome Guest Search | Active Topics | Sign In | Register

Dialog does not display original ContentURL Options
dmacchia
Posted: Saturday, January 19, 2008 3:42:24 PM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Hello. I am having an issue with the Dialog control that I am trying to solve. Maybe someone can lend some insight...

Within the properties of the Dialog control, I set the ContentURL to a specific page (i.e. Page1.aspx). The user clicks the designated ShowButton and up pops the dialog box and reveals Page1. Within Page1 I do some fun stuff and then redirect the ContentURL to another page (i.e. Page2.aspx). From Page2, users can click the "Close" button to hide the dialog. This returns to the underlying default.aspx page as expected.

Now that the user is back on the default page, he is able to click on the designated ShowButton again. However, when this happens, the dialog box pops up and displays Page2, not Page1. It is showing the last page that was displayed in the dialog. Is there any way I can get it to fall back to it's original ContentURL setting and display Page1?

Regards,
David
eo_support
Posted: Saturday, January 19, 2008 5:35:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I believe you can call the dialog's setContentUrl before displaying the dialog to change the content Url. But you won't be able to use ShowButton that way. You will need to use JavaScript to display the dialog. Please refer to our sample pages for more details on that.

Thanks
dmacchia
Posted: Sunday, January 20, 2008 10:37:05 AM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Ok, I tried what you suggested and the dialog box opens, but no ContentURL is displayed. Also, I made sure I removed the ShowButton and ClientSideOnLoad properties of the dialog. Obviously there something I am missing. Any ideas? Here is my simple code:

Code: JavaScript
function ShowDialog4(){
    var dlg = eo_GetObject('Dialog4');
    var url = "TransitionPage.aspx?Page=TryItNow.aspx";
    dlg.setContentUrl(url);
    dlg.show(true);
}


Code: HTML/ASPX
<a href="javascript:ShowDialog4();">Try It Now !!</a>


Regards,
David
dmacchia
Posted: Sunday, January 20, 2008 4:38:32 PM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Silly me!

Quote:
This function should only be used when the content Url has already been initially set by ContentUrl property.


Nothing that reading the manual can't handle! Anxious

David
eo_support
Posted: Monday, January 21, 2008 4:56:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Glad you found that. :) Thanks for the update.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.