• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening HTTPS link in same popup

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Jon Christensen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jon Christensen:


DO you really need target="NEWWINDOW" ?
Try removing this?
 
Jon Christensen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got this to work.
 
Jon Christensen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic