I have links that are https that need to open in a secondary window named 'NEWWINDOW'. I would like all of the links on a page to open in the same secondary window instead of opening a new window every time. The code below works fine when the link is HTTP but I always get a new window with HTTPS. Here is my code: in the .jsp file:
in newWindow.js file
Every time View Detail is clicked on the same page or different pages, a new window is created. The link always begins with https. I tested the above with http and it works fine. Thanks for any help you can give, Jon
http://www10.brinkster.com/A1ien51/Scripts/PopUpCheck.htm look at the 2nd script, I think it might work in your case to get around te problem with the secure connection. Eric [ January 07, 2004: Message edited by: Eric Pascarello ]
It looks like it should work but I don't understand what 'AlienPop' is. Also, doesn't the new window need a name so I reference the same window from other pages?
the AlienPop is just an object. You can rename it to whatever you want it to be. You look at the object and that shows if the window exsists or not. You can add in the window name to the window.open funtion. I just leave it to be very generic on my page. Eric
Removing the target did not help and now I can't get the javascript to work in a .js file. The following gives an error, AlienPop is undefined.
If I add "var AlienPop = new Object();" to the top of the .js file, AlienPop.location is null when clicking the link. I am sure I am missing something obvious but javascript has always confused me.
That works for one page and all the links on that page. Is there a way to reuse that same popup on different pages? For example,the user is on page1.jsp, clicks on View Details and gets a secondary window. Then the user selects a link to page2.jsp which opens in the main window (the secondary window is still open). After clicking on View Details on page2.jsp, another secondary window opens. I would like this View Details link to open in the same secondary window from page1.jsp. Is this possible?
Once you change pages on the main window you loose the reference to the pop up window. I know one way to get around it is with a hidden frame where the code resides, but then you have a framed site. I remember a friend playing with this idea, so I will talk to them and see if he ever came up with a solution about not loosing the object. Eric