Hello,
I am developing an application that is opened via a modal popup from another application that I do not have control over. In IE, the method of creating the popup that holds my application is window.showModalDialog. When I redirect the user via javascript with something as simple as, location.href='someURL'; another popup window is opened rather than just redirecting the browser.
When a user is using anything other than IE, the window.open method is used and those browsers redirect within the same window appropriately.
I have mocked up a very basic sample.
main.html is the external application.
popup.html is my application.
redirect.html is the page I need to redirect to within my application.
main.html:
popup.html:HTML Code:<html> <head> <script language="javascript"> function OpenPopup() { if (window.showModalDialog) { window.showModalDialog("popup.html","mywindow", "dialogWidth:1024px;dialogHeight:768px"); } else { mywindow= window.open ("popup.html", "mywindow","menubar=0,toolbar=0,location=0,resizable=1,status=1,scrollbars=1,width=1024px,height=768px"); mywindow.moveTo(300,300); if (window.focus) mywindow.focus(); } } </script> </head> <body> <a href="#" onclick="OpenPopup()">click</a> </body> </html>
redirect.html:HTML Code:<html> <head> <script language="javascript"> function Redirect() { location.href = "redirect.html"; } </script> </head> <body> <a href="#" onclick="Redirect()">redirect</a> </body> </html>
HTML Code:<html> <body> redirected </body> </html>


Reply With Quote

Bookmarks