开发者

update record without page refresh in javascript

开发者 https://www.devze.com 2023-03-04 03:20 出处:网络
I have a span in which dropdown is taken here dropdown records are with checkbox option . If I select \"All\" checkbox & click on save button then all checkboxes are selected using ajax therfore

I have a span in which dropdown is taken here dropdown records are with checkbox option .

If I select "All" checkbox & click on save button then all checkboxes are selected using ajax therfore page is not refreshed but when I does not check any ch开发者_开发百科eckbox & click on "Save" button I give a confirm box but when user press "Cancel" button on confirm box the the page is refreshed and data will not change, I want same but without this page is refreshed on cancel button


In the JavaScript code section, please add this statement at the end of the block:- "return false;"

This above statement will make sure that the page does not get POSTed / submitted when the "Cancel" button is clicked.

Hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消