troubleshooting Question

showModelessDialog issues

Avatar of jzeil
jzeil asked on
JavaScript
12 Comments1 Solution2903 ViewsLast Modified:
I'm using IE's showModelessDialog command and I am at a loss on how to use these things ( have yet to find a good resource) hopefully you can help.

I have two problems that I need solving.
1. When I click on a link in the modelessDialog it opens the link in a NEW window so now I have 3 windows (the parent, the modeless one and this new one).  I want the link to open in the modelessDialog
2.How can I make the modeless dialog refresh the parent when you close it?

Main.html
-------------------------
<html>
<head>
<title>Main</title>

<script language="Javascript1.2">
function modelesswin(url,mwidth,mheight){
    eval('window.showModelessDialog(url,window,"help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
}
</script>

</head>
<body>
<SCRIPT>
document.write(Date()+".")
</SCRIPT>

<br><br>
This is the main page.<br><br>
<a href="javascript:modelesswin('popup.html', 300, 300)">Click here</a> to open a modal window
</body>
</html>

popup.html
----------------------
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<title>Popup</title>
<script language="JavaScript1.2">

function refreshMain(){
//CODE HERE
}

</script>

</head>
<body>
This is the popup page.<br><br>

<a href="javascript:refreshMain();">Click here</a> close this window and refresh the main window.
<br><br>
<a href="http://www.cnn.com">Click here</a> load something new in this window.

</body>
</html>
ASKER CERTIFIED SOLUTION
Commodus2

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros