javascript - Prevent Parent page from reloading when exit button is clicked in popup -
I created a popup using the modal when the user clicks on a link then it will show this model popup. I have put an exit button inside the popup to close the popup. My problem is that when I click on the exit button, the popup is exited, but the parent page is reloaded.
Is there any way to prevent parents from reloading the page?
Here is the code for a modal popup:
& lt; Div id = "box-config-modal 1" class = "modal hide fade" style = "display: none;" & gt; & Lt; Div class = "box" id = "box-description" & gt; & Lt; H4 square = "box-header round-top" & gt; Details & lt; / H4 & gt; & Lt; Div class = "box-container-toggle" style = "padding-left: 20px; padding-right: 20px;" & Gt; & Lt; Div class = "box-content" & gt; & Lt; Form name = "popup" id = "popup" & gt; & Lt; Fieldset & gt; & Lt; Button class = "close" data-rejected = "model" & gt; & Lt; / Button & gt; & Lt; H3 & gt; User Details & lt; / H3 & gt; & Lt; Div class = "control-group" & gt; & Lt; Div class = "control" & gt; = "Typeahead" style = "width: 100px; float: left;" & Gt; Name & lt; / Label & gt; Label
Since your is not
submit any button that behaves as a button submit button with the button button.
Use this code
button class = "close" data-discarded = "model" onclick = "javascript: return false;" & gt; & lt; / Button & gt;
or
Comments
Post a Comment