Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:form - issue

 
S Krishnan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

I have a html:form with a couple of text boxes (html:text). The value of the second text box is automatically populated by a valid entry in the first text box. (Say for example, if we write a city name, the state is filled in automatically in the second text box).
- What is the best possible way to do this?
- How will I be able to read the text box value?
The document.form.item.value (as in JavaScript) doesnt seem to work with struts tag.

Thanks,
SK
 
Pranav Sharma
Ranch Hand
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javascript is the only way to do this without reloading the page.

If you do a "View Source" on the jsp generated by struts is nothing but simple old static HTML.
and since javascript works this form and elements, in all probability there is a problem with your script.

maybe you could post the script here or on the javascript forum. you will be amazed how quickly your questions are answered by Eric Pascarello in the js forum.
[ August 25, 2005: Message edited by: mannu kapoor ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic