Welcome Guest Search | Active Topics | Sign In | Register

Message Box - Server Side - Click X Options
CodeMaster
Posted: Friday, November 19, 2010 9:19:08 AM
Rank: Advanced Member
Groups: Member

Joined: 10/14/2010
Posts: 19
Support,

First have to save the message box is awesome!

Question, if the user clicks the 'X' to close the window I need it to post back because I need this to be handled like cancel to reset some drop down list values.

How do I cause a post-back if the X is clicked or disable the closing of the window until the user clicks Yes or Cancel only?
eo_support
Posted: Friday, November 19, 2010 10:42:07 AM
Rank: Administration
Groups: Administration

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

You can handle the message box's ClientSideOnCancel to achieve that. If you just want to disable the close button, you can return false from your ClientSideOnCancel event handler. It will be something like this:

Code: JavaScript
function on_cancel()
{
    return false;
}


Code: HTML/ASPX
<eo:MsgBox ClientSideOnCancel="on_cancel" ....>
....
</eo:MsgBox>


If you wish to raises a post back when user clicks "X", you can do so in your on_cancel function. If you are not familiar with raising post back with JavaScript, we have a free ScriptEvent control in the package to help you to do that:

http://doc.essentialobjects.com/library/1/eo.web.scriptevent.aspx

Hope this helps.

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.