views:

16

answers:

1

Hi, i mostly do CSS and php so i'm kind'a lost here, so no idea if this is possible the way i want it anyway, this is it:

I have this code

<html:textarea rows="10" cols="70" property="thankYouMessage" />

And i want this textarea to render an id of "textareaID" and a name like "textareaname"

how can i go about this?... if i use styleID, the page just won't load anymore... i need to apply some css to that markup so that's the thing.

Thanks in advance!

+1  A: 

styleId attribute should work (perhaps you mispelled it ? case is sensitive)

<html:textarea styleId="textareaID" property="thankYouMessage" ... />

IIRC (long time since Struts 1...) the generated name atribute in the HTML tag will coincide with the property attribute (ref). So in your example the generated HTML (you should check this, looking at the HTML source) should result in something like this:

<textarea id="textareaID" name="thankYouMessage" ...>

Normally you should'nt rely on name for accessing the element (e.g., in Javascript), prefer the id

leonbloy
you're right i mispelled that, shame on me, but what about the name atribute? thanks for your answer!
reg3n
i updated the answer
leonbloy