简体   繁体   中英

In Ajax when we use modal popup if you click on OK button there should not be postback

Any code related to modal popup to stablise is necessary..........and if the values are enter correctly then modal popup should get post back.....................

Please have the code in .Net

I ran into this as well. Assuming you are launching the dialogue via a button, and wiring up the button like this:

$("#buttonID") .click(function() { $("#dialog-vendorcontact").dialog("open"); }

On some browsers, clicking the button will launch the dialogue, but immediately submit the form. The fix is easy, add "return false" to the button on click event:

<button id="buttonID" onclick="return false;" > Show my Diaglogue </button>

P

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM