access another frame by one frame

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Angus the Fighter

    #1

    access another frame by one frame

    dear talented boys and girls,

    i have some problems in writing javascript in the following situation:
    could anyone tell me whats wrong with this:

    window.parent.f rames[2].src;

    why it display as "undefine"?

    angus


  • kaeli

    #2
    Re: access another frame by one frame

    In article <cdh1ag$9iv1@im sp212.netvigato r.com>,
    angusfighter@ho tmail.com enlightened us with...[color=blue]
    > dear talented boys and girls,
    >
    > i have some problems in writing javascript in the following situation:
    > could anyone tell me whats wrong with this:
    >
    > window.parent.f rames[2].src;
    >[/color]

    What were you looking for? I don't recall seeing a .src property for a
    window object.
    Assuming MSIE compliance, there is no src property of window.
    <http://msdn.microsoft.com/library/default.asp?
    url=/workshop/author/dhtml/reference/objects.asp>

    Perhaps you meant location?
    Note: location is also an object. If you want the URL as a string, use
    window.location .href.

    Also, keep in mind that arrays are 0-based in JS.
    frames[0], frames[1], etc.
    frames[2] is the THIRD frame in the frameset.

    You're really better off using names.
    Name the frame in the frameset, then use
    frames['theNameOfTheFr ame']

    That way, if they get moved around, you don't have to change anything.

    HTH
    --
    --
    ~kaeli~
    She was engaged to a boyfriend with a wooden leg but broke
    it off.



    Comment

    • Angus the Fighter

      #3
      Re: access another frame by one frame

      it works!

      thx a lot!

      angus

      "kaeli" <tiny_one@NOSPA M.comcast.net> ¼¶¼g©ó¶l¥ó·s»D
      :MPG.1b65c81f93 57053d989fb3@nn tp.lucent.com.. .[color=blue]
      > In article <cdh1ag$9iv1@im sp212.netvigato r.com>,
      > angusfighter@ho tmail.com enlightened us with...[color=green]
      > > dear talented boys and girls,
      > >
      > > i have some problems in writing javascript in the following situation:
      > > could anyone tell me whats wrong with this:
      > >
      > > window.parent.f rames[2].src;
      > >[/color]
      >
      > What were you looking for? I don't recall seeing a .src property for a
      > window object.
      > Assuming MSIE compliance, there is no src property of window.
      > <http://msdn.microsoft.com/library/default.asp?
      > url=/workshop/author/dhtml/reference/objects.asp>
      >
      > Perhaps you meant location?
      > Note: location is also an object. If you want the URL as a string, use
      > window.location .href.
      >
      > Also, keep in mind that arrays are 0-based in JS.
      > frames[0], frames[1], etc.
      > frames[2] is the THIRD frame in the frameset.
      >
      > You're really better off using names.
      > Name the frame in the frameset, then use
      > frames['theNameOfTheFr ame']
      >
      > That way, if they get moved around, you don't have to change anything.
      >
      > HTH
      > --
      > --
      > ~kaeli~
      > She was engaged to a boyfriend with a wooden leg but broke
      > it off.
      > http://www.ipwebdesign.net/wildAtHeart
      > http://www.ipwebdesign.net/kaelisSpace
      >[/color]


      Comment

      Working...