Hi There,Looking for your help please.
I have a webdialog that has a cancel button on it and I need it to act like the [x] in the top right hand corner. I.E. clicking it closes the webdialog window without causing a post back.
How would I do that?
Thanks for your help.
Best Regards,
Steve.
Hi Steve,
You may use hide of set_windowState methods of dialog. Below is example:
<script type="text/javascript"> function closeDialog() { var dialog = $find('<%=WebDialogWindow1.ClientID%>'); if(dialog)// dialog.set_windowState($IG.DialogWindowState.Hidden); dialog.hide(); }</script><ig:webdialogwindow id="WebDialogWindow1" runat="server" height="288px" width="380px"> <ContentPane> <Template> <input type="button" onclick="closeDialog()" value="close" /> </Template> </ContentPane></ig:webdialogwindow>
Hi Victor,
That works nicely but how would I do it with an image button.
<asp:ImageButton ID="imgbCancel" runat="server" ImageUrl="~/Images/dark_blue_dlg_cancel.gif" onclick="closeDialog()" />Compiler Error Message: BC30456: 'closeDialog' is not a member of 'ASP.printbyparam_aspx'.
Steve Wilson.
Thanks for the reply,I'll give that a try when I get back to my PC tomorrow.