function parameter question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Hansen

    function parameter question

    how do avoid this:

    function iframe01Locatio n(newLocation)
    {
    (iframe01.locat ion=newLocation );
    }

    function iframe02Locatio n(newLocation)
    {
    (iframe02.locat ion=newLocation );
    }

    i want to do something like this (this don´t work):

    function iframeLocation( iframeName, newLocation)
    {
    (iframeName.loc ation=newLocati on);
    }


    Michael.


  • Stephen

    #2
    Re: function parameter question

    Michael Hansen wrote:
    [color=blue]
    > how do avoid this:
    >
    > function iframe01Locatio n(newLocation)
    > {
    > (iframe01.locat ion=newLocation );
    > }
    >
    > function iframe02Locatio n(newLocation)
    > {
    > (iframe02.locat ion=newLocation );
    > }
    >
    > i want to do something like this (this don´t work):
    >
    > function iframeLocation( iframeName, newLocation)
    > {
    > (iframeName.loc ation=newLocati on);
    > }
    >
    >
    > Michael.
    >
    >[/color]
    maybe:

    window.frames[iframeName].location=newLo cation;

    ?

    Stephen

    Comment

    • Michael Hansen

      #3
      Re: function parameter question

      yup thanks!

      function iframeLocation( iframeName, newLocation)
      {
      (window.frames[iframeName].location=newLo cation);
      }

      works perfect :)

      /M



      "Stephen" <ssansom@austin .rr.com> wrote in message
      news:jzfeb.28$i H6.11@twister.a ustin.rr.com...[color=blue]
      > Michael Hansen wrote:
      >[color=green]
      > > how do avoid this:
      > >
      > > function iframe01Locatio n(newLocation)
      > > {
      > > (iframe01.locat ion=newLocation );
      > > }
      > >
      > > function iframe02Locatio n(newLocation)
      > > {
      > > (iframe02.locat ion=newLocation );
      > > }
      > >
      > > i want to do something like this (this don´t work):
      > >
      > > function iframeLocation( iframeName, newLocation)
      > > {
      > > (iframeName.loc ation=newLocati on);
      > > }
      > >
      > >
      > > Michael.
      > >
      > >[/color]
      > maybe:
      >
      > window.frames[iframeName].location=newLo cation;
      >
      > ?
      >
      > Stephen
      >[/color]


      Comment

      Working...