This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes html:form  -  issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:form  -  issue" Watch "html:form  -  issue" New topic
Author

html:form - issue

S Krishnan
Greenhorn

Joined: Aug 22, 2005
Posts: 5
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

Joined: Oct 27, 2003
Posts: 258
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 ]
 
Have you checked out Aspose?
 
subject: html:form - issue
 
It's not a secret anymore!