Monday, 15 September 2014

Will the dialog box( with jQuery) disappear on a Click event in asp.net? -


I have created a dialog box with jQuery. However, when I click on the button the dialog box disappears in a few seconds. One click event registered in my button I feel that for some reason my button is posting back to reload the page, but I'm not sure why this is happening or what's actually happening.

Can anyone tell me this problem? Jquery:

  $ (function () {$ ("# dialog"). Dialog ({autoOpen: incorrect, show: {effect: "bounce", duration: 1000000000},}); $ ("#Opener"). Click (function () {$ ("# dialog"). Dialog ("open");});});   

Dialog code:

  & lt; Div id = "dialog" title = "select the records that you want to combine" & gt; & Lt; ASP: labeled id = "label 1" runat = "server" text = "comments" & gt; & Lt; / Asp: Label & gt; & Lt; ASP: text box id = "textbox2" runat = "server" height = "59px" style = "margin-left: 13px" text mode = "multipurpose" width = "303px" & gt; & Lt; / Asp: text box & gt; & Lt; ASP: Button ID = "Button 2" Runat = "Server" Text = "Combination" /> & Lt; / Div & gt; & Lt; Asp: button id = "opener" runat = "server" text = "join" onclick = "button2click" /> By default, the button buttons submit in your button = "button"   

Add.

And, your button is defined as runat = "server" and for this there is a server onclick event, of course it must be postback to the server. / P>

  & lt; Button ID = "Opener" type = "button> combination     

No comments:

Post a Comment