Results 1 to 2 of 2

Thread: Addressing the source of a frame

  1. #1
    Join Date
    May 2003
    New York

    Addressing the source of a frame

    <frameset rows="150,*">
    <frame noresize="yes" scrolling="no" frameborder="no" src="Top.htm">
    <frameset cols="15%,*">
    <frame frameborder="no" noresize="yes" name="a" src="Contents.htm">
    <frame frameborder="no" src="" name="b">

    That is a couple of framesets i have on one page. Now, I have another page called Contents.htm which is the source of the frame named "a", as you can see.

    What i want to do, is have a function load on Contents.htm that will check which page is currently in frame "b" - and based on that it will document.write either a link or only text.

    Here is what i tried to do, and i know i messed up trying to reference the source of frame "b".

    function homePageCheck() {
    if (document.b == "WEBSITE") {
    document.write("&nbsp;&nbsp;<font color='gray'>Home</font>")
    else {
    document.write("&nbsp;&nbsp;<a href='WEBSITE' target='b'>Home</a>")

    If anyone happens to decipher this lol, I would appreciate if you could help me out. Thank You.

  2. #2
    Join Date
    Dec 2002

    Re: Addressing the source of a frame

    Originally posted by ai3rules
    if (document.b == "WEBSITE") {
    Try parent.b.location instead.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles