Reloading Parent page after modal popup window close


Sometimes it requires to create modal popup window, after inserting data, it requires reload parent page.


Code for Reloding parent page after modal pop-up window closed.



<html>
<head>
<title>Creating Modal Pop-up Window </title>
<script type="text/javascript">
function modalWin()
{
//Creating modal dialog box. When popbox creates, parent page execution stops.
//After closing pop-up window page loads again using reload() function.

window.showModalDialog("popup.html","name","dialogWidth:270px;dialogHeight:270px");
//Reloading webpage.
window.location.reload();
}
</script>
</head>
<body>
This page for creating modal pop-up window.
Click bold Link.
<a href="popup.html" target="name" onclick="modalWin(); return false;">Click Here</a>
</body>
</html>


Comments

Author: Jayesh L Lolariya09 Nov 2011 Member Level: Silver   Points : 0

thanks for posting this.
it helps me.


thanks
jayesh l
sqlassistant.blogspot.com



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: