Yes, you can do this. You can use JavaScript to do this (so it's a
client-side solution). As long as you're working within the frameset (and
not using window.open() to create other windows), and as long as all frames
(including the container frame) remain within the same domain, protocol,
and server port, then a JavaScript running in one frame has access to the
variables, functions, objects, methods and properties all other frames (as
well as any scripts you store within the Frameset container page).
Make sure you name each frame with the NAME attribute of the FRAME tag.
Suppose the following frameset definition:
<FRAMESET>
<FRAME NAME="shortcutbar" SRC="abc.html">
<FRAME NAME="content" SRC="xyz.html">
</FRAMESET>
Suppose also that "xyz.html" contained a form called myform (as defined in
the form's NAME attribute). If you have a button (or simply a link <A
HREF="javascript:some_javascript_code">image or button to submit your form
here</A>) contained within your "abc.html" shortcutbar frame, it can submit
the other form using the following script call:
parent.content.document.myform.submit()
Alternatively, if "xyz.html" (the page containing the form) contains a
script - called, say, "mySubmitFunction" - to submit the form, you could
invoke it from the shortcutbar frame using the following call:
parent.content.mySubmitFunction()
The form has an attribute called TARGET (which is scriptable if you need to
change it), which can send the data from the form to any other frame to be
captured there instead.
However, I would still urge caution if you rely on JavaScript. There's
nothing to stop you placing more than one submit button, i.e.: one at the
top of your form, and one at the bottom too. You could still use the
"remote" submit technique described above in addition if you wanted to
really make it easy for them..!
I haven't tested the exact code above (I haven't had time), but I've being
doing work on many such projects over the last week, so it should work. :-)
You'll probably need to adapt it slightly for your particular case anyway.
Alternatively, submit your form to the top level of the window
(target="_top"), process it, and redirect it to the appropriate frameset.
Hope this helps,
Chris Brown
Webnet, Paris
-----Message d'origine-----
De: Leisman, Ed P [SMTP:[EMAIL PROTECTED]]
Date: mardi 17 ao�t 1999 16:24
�: [EMAIL PROTECTED]
Objet: Frames, and Servlets, and JSP, oh my...
OK, Gang of Cheers....
Here is my deal.
You've all been faced with these issues I'm sure so I'd appreciate a little
enlightenment...
Here is the scenario:
A frame with three frame sets:
Top frame is a header displaying content based on Attributes being set
Middle frame: Order entry. This frame has too much info to be shown on
one
screen (of course), so it is scrollable
Bottom frame has one navigation button, but more importantly has a submit
button. This submit should submit the information from the middle frame.
Reason being (surprise, surprise) is that the users do not want to go all
the way to the bottom of the screen to press submit - especially when they
only needed to change some information at the top.
ANY WAY TO DO THIS????
Can a button from one frame call the submit to another frame and capture
the
data from it?
Thanks all you geniuses out there!!!!!
Edward P. Leisman
Eaton Cutler-Hammer
Web Development Team
Phone: 412.893.3805
Fax: 412.893.2156
Email: [EMAIL PROTECTED]
<< Fichier: ATT00000.htm>><< Fichier: image001.jpg>>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
For JSP FAQ, http://www.esperanto.org.nz/jsp/jspfaq.html