Is it possible to pass arguments to the ClientSideOnAccept javascript function defined for a dialog?
If possible, ideally it would resolve, or somehow accept, the AcceptButton (Button.UniqueID) defined for that dialog.
The idea is to have generic function that would handle the click/enter event for all common dialogs accept buttons and execute (eval) the WebForm_DoPOpstBackWithOptions() function and be able to resolve the name of the button for that dialog.
If it is not possible to pass the button name (resolved to <%= Button.UniqueID %>), how would I find the Accept Button UniqueID using javascript for the specific dialog in a generic function?
Here's the jist of what I would like to do:
Code: JavaScript
function handleClick(button) {
eval("WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('" + button + "', '', true, '', '', false, true))");
}
Code: HTML/ASPX
<eo:Dialog ID="dialog"
ShowButton="showButton"
runat="server"
...
AcceptButton="myAcceptButton"
ClientSideOnAccept="handleClick('<%= myAcceptButton.UniqueID %>')">
...
<asp:Button ID="myAcceptButton" runat="server" Text="Accept Button" OnClick="Create_Click" />