• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

html:form - issue

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I want my playground back. Here, I'll give you this tiny ad for it:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic