<script type="text/javascript">
function Popup() {
// if ($("#CHK").prop(":checked")) {
// // checkbox is checked
// //popupWindow = window.open("Popups/approval.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=No');
// }
// else {
// // checkbox is not checked
//
// }
$("#CHK").prop("checked") ? popupWindow = window.open("Popups/approval.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no, status=No') : alert("Please Check the textbox for approval or close the dialog");
}
</script>
I tried these scripts but it is not working..
Note : CheckBox is in JQUERY dialog box ..
these script only gives the else part ..
I tried to use AUTOPOST property but it also not working by this dialog redirected to its original page..
<asp:CheckBox runat="server" ID="CHK" Checked="false" Font-Bold="true" Font-Size="Small" Text="Tick For Approval" AutoPostBack="true"/><br /><br />
<asp:Button ID="BtnPop" runat="server" Font-Size="Small" CssClass="myButton" OnClientClick="Popup();return false;"
Width="2%" Text="OK" />