Thread: frames

    #1
  1. No Profile Picture
    drosen
    Guest
    Devshed Newbie (0 - 499 posts)
    Hello, I have frames on my page. When entering my site, my visitor chooses if he will be using the service from the US or elsewhere. He/She is linked to the respective page (with frames) depending on what he clicks. That is al fine but I want to give my user the option of, having chosen the wrong link at the beginning, switching to the other part of my website. EX: he/she initially clicked from the US, got there, and realized that he should be in the not from US part.

    So I added the link the left frame of my page linking to the other part of the site. I am having trouble getting a complete new page to load when the user clicks the link. It always loads within the current framed page. I want both the left and the main frame to change when the user clicks on the link to go to the other part of my site.

    I hope you can understand what I am saying and what I am trying to do and any help would be greatly appreciated. I have not loaded the extra links to switch between US and not US on my page, but if you want to generally see what it is check out http://www.international01.com.

    Thank you so much in advance.

    Damien Rosen

    ------------------
    www.international01.com
  2. #2
  3. No Profile Picture
    dahamsta
    Guest
    Devshed Newbie (0 - 499 posts)
    Damien,

    I can't get further than the "Check out these rates bit", but I think you mean that the link is loading in the frame that the user links from yes? Well, the simplest way about it is to make a link to the frameset for the other location, using target="_top" as an attribute in the href tag.

    The other solution is to use a tag like:

    <a href="left-frame.htm" onClick="top.frames[1].location='right-frame.htm'"; return true">Go to USA</a>

    ... however this won't work in browsers with JavaScript disabled.

    adam
  4. #3
  5. No Profile Picture
    drosen
    Guest
    Devshed Newbie (0 - 499 posts)
    Hey Adam, thank you so much for the reply. I actually figured it out using something like target=_parent and it works! I will try to do it with your code as well.

    I fully appreciate your reply, thank you.

    Damien

    ------------------
    www.international01.com
  6. #4
  7. No Profile Picture
    dahamsta
    Guest
    Devshed Newbie (0 - 499 posts)
    Gods it's been a while since I was here! Anyway, just a note on using _parent instead of _top:

    _parent will work grand for what you need, but you'll find that if you're using nested framesets, i.e. a frameset within a frameset, that that will target the top of the *current* frameset, not the top of the window. So _top is what you should *really* be using in these circumstances.

    But if it works it works!

    Cheers,
    adam

Similar Threads

  1. Replies: 0
    Last Post: September 29th, 2003, 11:25 AM
  2. frames w/o frames?
    By XxKainexX in forum Beginner Programming
    Replies: 3
    Last Post: June 21st, 2003, 01:55 AM
  3. How can I remove gaps in frames in IE MacOSX?
    By jkoerber in forum HTML Programming
    Replies: 3
    Last Post: April 18th, 2003, 12:36 PM
  4. the path to various frames
    By Garrett_44 in forum HTML Programming
    Replies: 1
    Last Post: October 31st, 2001, 09:43 PM
  5. why do my frames do this?
    By dan_2001 in forum HTML Programming
    Replies: 8
    Last Post: August 6th, 2001, 04:04 AM

IMN logo majestic logo threadwatch logo seochat tools logo