[Javascript] how to pass values to a frame

David Lovering dlovering at gazos.com
Tue Sep 9 10:58:58 CDT 2003


About the only thing I can add is that it sounds like you may need to build
a function that synchronizes the values between various fields in the forms
within your two frames.
Simply add a reference to each originating form as onsubmit='sync(this)' in
each of the forms declarations, and then make sure that it looks at all the
fields you need to match up.

I should mention that if you use POST methods to move stuff between your
forms and your handlers, ALL the forms variables get transported, and this
patch-and-fill becomes largely unnecessary.  Then all you need to do is add
a little routine in the header of each form to discover if a predefined
passed value exists (as per an outside call) for each of your synchronized
fields, and then write it into the local field of the equivalent name.

-- Dave Lovering

----- Original Message ----- 
From: "Chris Tifer" <christ at saeweb.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Tuesday, September 09, 2003 6:14 AM
Subject: Re: [Javascript] how to pass values to a frame


> Just do this:
>
> parent.frames["frameName"].location.href = "/pagename.html?param=newValue"
>
> It works off the same premise of what I gave earlier. The main thing I'm
> trying to point out to you is the ability to target specific frames
through
> the frames collection.
>
> Chris Tifer
> http://emailajoke.com
>
>
> ----- Original Message ----- 
> From: "murugesan" <murugesan at hotpop.com>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Tuesday, September 09, 2003 9:03 AM
> Subject: Re: [Javascript] how to pass values to a frame
>
>
> > Thanks for the reply.
> >
> > I think I was not clear in explaining my point
> > I have two frames which is the main page main.html
> > This page has query parameters to each frames say main1.html?id=hai1 and
> > main2.html?id=hai1
> > In main2.html I submitted a form and I changed the value id to "bye"
> > Now when I click a link in frame main1.html
> > which then opens a page main2.html?id=hai
> > My need is that to open main2.html?id=bye
> > That is upon submitting the form in frame main2.html I want to change
the
> > query parameter of page main1.html
> > Any help would be appreciated ?
> >
> > -Murugesan
> >
> > ----- Original Message -----
> > From: "Chris Tifer" <christ at saeweb.com>
> > To: "[JavaScript List]" <javascript at LaTech.edu>
> > Sent: Tuesday, September 09, 2003 6:26 PM
> > Subject: Re: [Javascript] how to pass values to a frame
> >
> >
> > > You lost me a little bit on the explanation, but say you have two
> frames:
> > > Header and Main (those are the names of the frames you designate)
> > >
> > > And if you have a function in the "Top" frame called doThis() and you
> want
> > > to call it from the bottom from, you would target it like:
> > >
> > > parent.frames["Header"].doThis()
> > >
> > > and vice versa if you wanted to call a function that resides in "Main"
> > from
> > > "Header"
> > >
> > > It will work the same with variables... Hopefully that gives you an
> idea.
> > >
> > > Chris Tifer
> > > http://emailajoke.com
> > >
> > > ----- Original Message -----
> > > From: "murugesan" <murugesan at hotpop.com>
> > > To: "[JavaScript List]" <javascript at LaTech.edu>
> > > Sent: Tuesday, September 09, 2003 8:50 AM
> > > Subject: [Javascript] how to pass values to a frame
> > >
> > >
> > > > I have two frames in same window.
> > > > In one frame I submit a form which changes values (query parameters
of
> > > > frame1).
> > > > After submitting the form when I click a link in frame one it then
> > passes
> > > a
> > > > value to frame 2.
> > > > Since I changed the value in the frame 2 ( through submit) frame 1
has
> > > only
> > > > old values and passes this old value to frame 2.
> > > > How can pass values to frame 1 upon submitting a form in frame 2
> > > > -Murugesan
> > > >
> > > >
> > > > _______________________________________________
> > > > Javascript mailing list
> > > > Javascript at LaTech.edu
> > > > https://lists.LaTech.edu/mailman/listinfo/javascript
> > >
> > > _______________________________________________
> > > Javascript mailing list
> > > Javascript at LaTech.edu
> > > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>





More information about the Javascript mailing list