Forum Moderators: open

Message Too Old, No Replies

closing both frames with HREF

new window opens in main frame

         

nunu

8:23 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



I'm using a 'canned'HTML album generator that uses Java to create thumbnails in the left frame and the right to display the photo at full size. The problem is that when the home icon is clicked instead of opening the album index as a new window it opens it in the right frame, leaving the thumbnail frame on the page.

The code shown is in theme.js (there are two more java scripts)
var themeURL = "<A HREF=\"%s\"><IMG src=\"home-button.gif\" width=\"33\" height=\"31\" NAME=\"IGNORE\" alt=\"%s\"></A>"

Solution please?

PS: I am a raw beginner when it comes to Java

Thanks to any who will help
Norah

Purple Martin

10:25 pm on Feb 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Add target="_top" to the link so that the link points to the top level frameset, like this (there are backslashes added so that the quotes don't get confused):

var themeURL = "<A target=\"_top\" HREF=\"%s\"><IMG src=\"home-button.gif\" width=\"33\" height=\"31\" NAME=\"IGNORE\" alt=\"%s\"></A>"

Tip for raw beginners: There are two entirely separate languages with confusingly similar names: Java and JavaScript. They're not the same thing at all, so try not to mix up the names. This question was about JavaScript ;-)

nunu

12:07 am on Feb 10, 2004 (gmt 0)

10+ Year Member



Thank you so much for the help and the feedback on my ignorance. Your code did the trick. Now I just have to figure out the other problems. But then that is how I learn.

Norah