SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I have a page with a small frame on the top, and another on the bottom. I was wondering what code I would use to specify the URL of the bottom frame FROM the top?

    IE: I have a JavaScript variable called "location", which holds the URL I would like to load in the frame. The frame is called "main".

    I tried this like

    location = window.frames.main.location

    and

    location = window.main.location

    but nothing seems to work. Can someone help me out?

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi TWT,

    this should do the job...

    parent.main.location='your_page.htm'

    (When you've got a framed page, window refer to the current frame. If you want to refer to the main window you've got to use parent.As well if you want to interact with other frames you have to pass by the main window. It's like a path to access frames within you pages).


    <Edited by cyberbrain on 12-01-2000 at 05:10 PM>

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks cyberbrain - it was totally driving me nuts!

    Can you possibly, in addition, point me to a tutorial on JavaScript's DOM?


  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately I don't know any site specifically consacred to the DOM. (your best guess would be to visit the NS or IE website or some javascript tutorial site).
    Anyone?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •