Welcome Guest Search | Active Topics | Sign In | Register

trying to show eo.dialog in response to two buttons Options
gib65
Posted: Friday, December 14, 2012 4:28:28 PM
Rank: Newbie
Groups: Member

Joined: 12/14/2012
Posts: 2
Hello,

This is my first post here.

I'm working with the eo.dialog object in an aspx page. I want to get it to show up in response to two buttons. It doesn't seem like the ShowButton attribute allows for more than one button.

I tried showing the dialog in a javascript function that gets called in response to clicking either of the two buttons, and it seems to work (the dialog shows up), but it disappears again as soon as the javascript function ends.

I'd like to know either 1) how to associate the ShowButton attribute with more than one button, or 2) how to get the dialog to stay visible even after the end of the javascript function that shows it.

Thank you.
eo_support
Posted: Friday, December 14, 2012 4:47:03 PM
Rank: Administration
Groups: Administration

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

You will need to call this method to display the dialog instead of using ShowButton:

http://www.essentialobjects.com/doc/1/jsdoc.public.dialog.show.aspx

The code would be something like this:

Code: JavaScript
eo_GetObject("Dialog1").show();


The dialog ALWAYS stays open after the code returns. It was closing immediately for you probably because the same button also caused a page post back for you. If that's the case, you do not need to use a server button. You can just use a regular HTML button instead. For example:

Code: HTML/ASPX
<input type="button" onclick="your_click_handler()" value="Show Dialog" />


You would then call show method inside "your_click_handler".

Thanks!
gib65
Posted: Monday, December 17, 2012 11:07:38 AM
Rank: Newbie
Groups: Member

Joined: 12/14/2012
Posts: 2
Thanks eo_support,

Using the input tag instead of the asp:button tag worked.
eo_support
Posted: Monday, December 17, 2012 1:23:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Great to hear that it works for you. Please feel free to let us know if you have any more questions.

Thanks!


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.