update record without page refresh in javascript
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.
精彩评论