I am using ie 8 to open a modal dialog that is required to redirect itself to another url. My problem is that the modal dialog always opens the new URL in a new window. below are the code statements that I've tried to solve the problem:
window.navigate("www.microsoft.com");I've tried also the location property of the document object with no different result
does anyone know a solution for this problem?
I had the same problem before, but I was using a form. When we have a modal dialog, the submit result opens a new window just like your problem (I think it's the same problem). It was solved when I named the window and seted a target to the form.
window.name = "testPage"; (...) <form name="frmTest" action="/testaction" method="post" target="testPage">
It worked fine.
- Proposed as answer by João Soares Wednesday, February 10, 2010 12:13 PM
It worked fine by just naming setting the name of the window and then calling window.open() passing it the name of the window, very much like the following code segemnt:
window.name="SomeWindowName"; window.open("www.microsoft.com","SomeWindowName");thank you very much for revealing the solution :)