Is there any way to pass along values between sides, or how else can I do this ?

Discussion in 'Javascript' started by H, Nov 23, 2003.

  1. H

    H Guest

    Ok, this is the scene ...

    I have an indexfile, in which I specify 2 frames. ( yeah! I know they're
    evil, but this comes from an assigment in school, whick I am adding some
    stuff to, so I can actually use it on my site..)

    In one of the frames I initialize a variable (lets call it V), and the I use
    it, and so far everythings fine. Then at one point I am changing frame nr2,
    to display some things from the forms etc in frame1. I do this by
    setting..location="page2.html", and that works fine too. Now the tricky
    part, when the forms are filled out again I want to change back to page1 and
    depending on the var V different things may be showed.
    But HOW can I get frame2, (and it's page1) to know what V is ?

    As it is now all I do is link to the JSfile, and I hoped that the globals
    there would have the value they got from frame1, but apparently thats not
    the case.

    So I'm wondering if there is anyway to pass V along to page1 ?

    If I run my initiliazing function from the index file, with the frameset,
    would frame 1 and 2 know what index put in the variables then ? And if this
    is the case, how can I run init() from index, could an body tag be added,
    and onclick be used ?

    I could also maybe do it by letting my functions draw frame2 pages, but then
    the question is ; Is there any way to "clear" the page before I start my
    drawings ?

    3rd way. If I keep page 1 in frame2 all the time, is there anyway to make it
    run an function from frame2 ?
    Like in frame1 ; parent.frame.frame2.MyFunction ... something like that ...

    I hope you get all my ramblings... I have tried getting this to work for
    awhile now, and I'm beat... SO please come up with an nice and
    understandable answer.

    TIA
    H
    H, Nov 23, 2003
    #1
    1. Advertising

  2. H

    kaeli Guest

    In article <EBTvb.34812$>,
    enlightened us with...
    > In one of the frames I initialize a variable (lets call it V), and the I use
    > it, and so far everythings fine. Then at one point I am changing frame nr2,
    > to display some things from the forms etc in frame1. I do this by
    > setting..location="page2.html", and that works fine too. Now the tricky
    > part, when the forms are filled out again I want to change back to page1 and
    > depending on the var V different things may be showed.
    > But HOW can I get frame2, (and it's page1) to know what V is ?
    >



    Pass it as a param, then parse the URL.

    ....location="page1.html?V="+v;

    Have page1 parse the url for the value of V. There's a ton of stuff in
    the archives on how to do that.

    --
    --
    ~kaeli~
    Press any key to continue or any other key to quit
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Nov 23, 2003
    #2
    1. Advertising

  3. H

    H Guest

    "kaeli" <> skrev i meddelandet
    news:...
    > In article <EBTvb.34812$>,
    > enlightened us with...
    > > In one of the frames I initialize a variable (lets call it V), and the I

    use
    > > it, and so far everythings fine. Then at one point I am changing frame

    nr2,
    > > to display some things from the forms etc in frame1. I do this by
    > > setting..location="page2.html", and that works fine too. Now the tricky
    > > part, when the forms are filled out again I want to change back to page1

    and
    > > depending on the var V different things may be showed.
    > > But HOW can I get frame2, (and it's page1) to know what V is ?
    > >

    >
    >
    > Pass it as a param, then parse the URL.
    >
    > ...location="page1.html?V="+v;
    >
    > Have page1 parse the url for the value of V. There's a ton of stuff in
    > the archives on how to do that.

    Ok, thanks !
    H, Nov 23, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    25
    Views:
    641
    MonkeeSage
    Oct 1, 2006
  2. Knute Johnson

    How do you pass along a mouse event?

    Knute Johnson, Jan 18, 2007, in forum: Java
    Replies:
    1
    Views:
    420
    Tom Hawtin
    Jan 18, 2007
  3. Alan Silver
    Replies:
    7
    Views:
    431
    Alan Silver
    Jul 18, 2007
  4. Reply Via Newsgroup

    How can I trim the sides of a string?

    Reply Via Newsgroup, Apr 5, 2004, in forum: Javascript
    Replies:
    11
    Views:
    193
  5. B. W.
    Replies:
    2
    Views:
    109
    Eric Bohlman
    May 20, 2004
Loading...

Share This Page