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

H

H

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
 
K

kaeli

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.

--
 
H

H

kaeli said:
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 !
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top