Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validate struts dropdown list

Status
Not open for further replies.

jagprg

Programmer
Jun 16, 2005
11
US
Hi,

I have a Struts custom tag (a drop down list) about 5 items in the list with the first just being blank.

I want to validate this using javascript but I dont know how to read/get its value in javascript.

any ideas ?

Code:
<TCS:doctypes noneallowed="true" />

the above is the tag with generates the list.

thanks
 
can u control the name in which the tag is outputted???

i want u to do view source of the page and give me the actual HTML that the tag has generated...

Known is handfull, Unknown is worldfull
 
I'm not a Java developer by any means, but a quick search on Google for "struts select" gave this link right at the top:


It shows that you can use "name" to set a name on the element, which you can then read back by accessing the form element in the normal way.

If you require further help with the struts side of things, I'd ask in a struts / java / jsp forum. For the validation side, you'd need to provide client-side source and ask here.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top