Click here to Skip to main content
15,921,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to add page refresh property in this javascript



XML
<script type="text/javascript">
function ConfirmationBox(username) {

var result = confirm('Are you sure you want to Activate '+username+' ?' );

if (result) {

return true;

}
else {
return false;
}
}

</script>
Posted

1 solution

Use window.open or simply window.reload();

Check out this link:
http://www.w3schools.com/jsref/met_win_open.asp[^]

Good luck!
 
Share this answer
 
Comments
Amirsalgar1 7-Mar-13 7:52am    
how i will add that window.reload() in above javascript ..i tried a lot but it is not working .. i want to make page redirect after selecting ok or cancel button from confirmation box
E.F. Nijboer 7-Mar-13 8:27am    
Did you add it before the return statement? Otherwise the function was already left and the code was never reached.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900