Suraj
Suraj

Reputation: 2563

on click to close button of a modal load a page

I have a modal having a close button like below.

 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>

When I click on the button close, I want to refresh the page which shows up after I clicked on closed or hit the esc button of my keyboard.

I tried with onclick=javascript:window.location="/pages/test"

But doesn't work.

Please help.

Upvotes: 0

Views: 69

Answers (1)

Dr Cox
Dr Cox

Reputation: 159

If you're using the Bootstrap modal, this should do it:

<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

Upvotes: 1

Related Questions