passing information between frames

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

    #1

    passing information between frames

    I am very very new to jscript. What I want to do is set a variable in one
    frame of a page, and then reload another frame so that it uses the new
    variable. Is this possible? I want to have a thumbnail menu in the first
    frame, where clicking on the thumbnail sets a variable equal to the larger
    image's filename. The script would then reload the page in the larger
    frame, which uses the new variable value to load the larger version of the
    image. I have probably now completely shown my ignorace of js, as I think I
    used the wrong terminology, but I hope what I want to do was explained
    adequately.

    TIA

    Josh


  • kaeli

    #2
    Re: passing information between frames

    In article <6rI4e.994$go4. 627@newsread2.n ews.atl.earthli nk.net>,
    misc@misc.com enlightened us with...[color=blue]
    > I am very very new to jscript. What I want to do is set a variable in one
    > frame of a page, and then reload another frame so that it uses the new
    > variable. Is this possible?[/color]

    In most browers, yes.
    But frames can suck if not done right.

    I hope you have a dynamic frameset and a little blurb on the framed pages
    that say "this frame should be in my frameset" with a link to reload the
    frameset properly. If a user comes in through a search engine and gets only
    one page, it's a real hassle if you don't have that stuff.
    Among other problems with bookmarking and the like...
    [color=blue]
    > I want to have a thumbnail menu in the first
    > frame, where clicking on the thumbnail sets a variable equal to the larger
    > image's filename. The script would then reload the page in the larger
    > frame, which uses the new variable value to load the larger version of the
    > image. I have probably now completely shown my ignorace of js, as I think I
    > used the wrong terminology, but I hope what I want to do was explained
    > adequately.[/color]

    You may not need to get this involved, really. As long as you're using
    javascript, you can simply reassign a new value to the source of the image
    tag instead of reloading the entire page. Assuming all you are changing is
    the image. This is easier than trying to set variable names and stuff.

    i.e. in the first frame:
    <img src="myThumb.jp g" onClick="top.fr ames['largerFrameNam e'].document.image s
    ['theBigImageNam e'].src='theNewLar gerImage.jpg';" >

    (I didn't test that, but you get the idea)

    --
    --
    ~kaeli~
    Press any key...NO, NO, NO, NOT THAT ONE!!!!!!



    Comment

    Working...