*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:form - issue
 
Similar Threads
javascript
How to do it?
Updating the value of Text box
jsp + dropdown + automatically populate the vales from the db in the Text box
Submitting Input fields in struts