Friday, November 30, 2007

Struts StyleId attribute

In HTML, we can make references to an element by the "id" attribute.

Example: input type="text" name="carrier" id="carrierId"

We can reference this element in javascript as document.getElementById("carrierId")

In Struts, 1.1 we do not have this attribute "id". To make a reference we can instead use the styleId attribute

Example: <html:text property="carrier" styleId="carrierId" />

1 comment:

raju said...

thanks for giving clearcut understanding