• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting parameterValues from a separate frame

 
Trevor Pereira
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic