Disable postback on jQuery dialog

boxingtalk

New Member
Is there a way to block jquery modal dialog from popping up each time dropdownlist postback is called? Because seems like the whole page refreshes hence my jquery modal dialog also will pop-up but I want to block that from happening, I only need it to be popup when the page is loaded first time.Here's my Javascript, tried using the event.preventDefault but it's not working still.\[code\]$(function() { $("#ddlNo").click(function(event) { event.preventDefault(); }); $("#dialog").dialog({ autoOpen: true, closeOnEscape: false, modal: true, show: { effect: "fade", duration: 1000 }, buttons: { "Confirm": function() { var bValid = true; allFields.removeClass("ui-state-error"); bValid = bValid && check(true); if (bValid) { $("#users tbody").append("<tr>" + "<td>" + agree.val() + "</td>" + "</tr>"); $(this).dialog("close"); } } }, close: function() { allFields.val("").removeClass("ui-state-error"); } });});\[/code\]Here's my markup:\[code\]<asp:DropDownList ID="ddlNo" runat="server" DataSourceID="odsEq" DataTextField="No" DataValueField="Id" AutoPostBack="true"></asp:DropDownList>\[/code\]
 
Back
Top