I need to reload the page after the OK button is clicked on the Alert box. I am using the following code for it
alert(\"Successful Message\");
window.locati
Interesting that Firefox will stop further processing of JavaScript after the relocate function. Chrome and IE will continue to display any other alerts and then reload the page. Try it:
<script type="text/javascript">
alert('foo');
window.location.reload(true);
alert('bar');
window.location.reload(true);
alert('foobar');
window.location.reload(true);
</script>
Try this code..
IN PHP Code
echo "<script type='text/javascript'>".
"alert('Success to add the task to a project.');
location.reload;".
"</script>";
IN Javascript
function refresh()
{
alert("click ok to refresh page");
location.reload();
}
alert('Alert For your User!') ? "" : location.reload();
You can write above code in this format also.It seems quite decent
Bojan Milic answer work in a way but it error out with a message below,
This can be avoid with,
function message()
{
alert("Successful message");
window.location = 'url_Of_Redirected_Page' // i.e. window.location='default.aspx'
}