sleerk
07-15-2003, 08:20 PM
We have a VB application where we pop up an HTML file using VB code. However, if there is already a browser window open, this page opens up in the current window. Apparently there is no way of coding so that it always opens in a new window.
I could open a page which uses javascript to open the new window, then uses history.back to go back to the previous page. Ok, fine, but then if there WASNT a window already open, we end up with a blank window sitting there.
I could use window.close or similar to close the parent, but that's not wanted either - the previous page might be needed by the user.
Is there a way to get the script to do either of two options: If there is no history in the parent, close the window. If there is history in the parent, go back 1.
Of course, I dont want the warning message 'The web page you are viewing is trying to close the window'.
Thanks
Jeff
I could open a page which uses javascript to open the new window, then uses history.back to go back to the previous page. Ok, fine, but then if there WASNT a window already open, we end up with a blank window sitting there.
I could use window.close or similar to close the parent, but that's not wanted either - the previous page might be needed by the user.
Is there a way to get the script to do either of two options: If there is no history in the parent, close the window. If there is history in the parent, go back 1.
Of course, I dont want the warning message 'The web page you are viewing is trying to close the window'.
Thanks
Jeff