in window1.html, when the user clicks the button, set some text field in the parent window (Test.html) and close window1.
Then in test.html, depending on the value set, show the window2.html
Main Topics
Browse All Topics
I want to hide a showmodaldialog window. Is it possible.
For example.
From a asp page I am displaying a window using showmodaldialog(win-1) from that win-1 I am again displaying a window using showmodaldialog(win-2).
I want to hide the win-1 at the time of win-2 display.
Is it possible. I want to open a page using only showmodaldialog because i have lots of routine after the window got closed.
My code is very big so I created sample as below.
File Name : Test.html
<html>
<body>
This is Test Page <br>
Click to go to parent window<input type="button" value="Click" onclick="test()">
<script>
function test()
{
var sURL ='Window1.html'
var xx = window.showModalDialog(sUR
}
</script>
</body>
</html>
File Name : Window1.html
<html>
<body>
This is Parent window
<br>Click to go to child window<input type="button" value="Click" onclick="test()">
<script>
function test()
{
var sURL ='Window2.html'
var xx = window.showModalDialog(sUR
}
</script>
</body>
</html>
File Name : "Window2.html"
<html>
<body>
This is Child window
</body>
</html>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't think you can hide the window, but you could probably move it offscreen?
However, another method would be in Window 2, have some code:
window.onblur = window.focus
so if a user tries to reactivate an existing window, the child window will regain itself the focus and remain permanently in display.
Business Accounts
Answer for Membership
by: ivostoykovPosted on 2006-09-27 at 01:34:50ID: 17608399
Hello isoftindia3,
modal dialor means that the application blocks (does not respond) until modal window is open. It is always on top. so hiding modal is not recomended at 1st glance....
HTH
I