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.
|
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.aspxThe 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!
|
Rank: Newbie Groups: Member
Joined: 12/14/2012 Posts: 2
|
Thanks eo_support,
Using the input tag instead of the asp:button tag worked.
|
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!
|