| Author |
getting parameterValues from a separate frame
|
Trevor Pereira
Greenhorn
Joined: Sep 11, 2002
Posts: 12
|
|
I have two frames. The frame at the bottom contains my submit button that calls my servlet while the top frame contains my values that I need to pass via HttpRequest. How do I retrieve those parameters from the top frame. "getParameterValue(String)" only works where the form data is in your current frame
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
For programming on the browser, your only real choice is JavaScript. You can use it to grab variables from the form(s) in the top Frame as they are entered and stick the values in hidden form variables in the bottom. You can also use it to do preliminary validation. There are LOTS of Javascript books. Bill
|
Java Resources at www.wbrogden.com
|
 |
Philip Shanks
Ranch Hand
Joined: Oct 15, 2002
Posts: 189
|
|
Trevor, This isn't a Javascript forum, so I'll keep this short. I think that the easiest way to do this is to add an "onBlur()" method to each INPUT element in the top form, and have it set the value of a corresponding hidden INPUT element of the real form in the bottom frame. When you do a form submit, only the name/value pairs from the submitting form are passed, and it is not possible to have a form spread across two frames -- they are treated as separate documents by the browser. Good Luck! PCS [ November 14, 2002: Message edited by: Philip Shanks ]
|
Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!
|
 |
 |
|
|
subject: getting parameterValues from a separate frame
|
|
|