• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add checkbox html tag?- urgent!

 
Liz Brown
Ranch Hand
Posts: 112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add a checkbpx in front of every row of this table? Please help!
---------------------------------
<table border="0" cellspacing="0" cellpadding="1" align="center">
<tr class="tblcaption">
<INPUT TYPE=CHECKBOX NAME="maillist">
<logic:iterate indexId="colCtr" id="col" name="myInfo" property="sortedList" type=" com.api.ColumnInfo">
<logic:equal value="true" name="col" property="visible">
<TD>
<bean:message key="<%=col.getMyLabelKey()%>" bundle="MyResources"/>
</TD>
</logic:equal>
</logic:iterate>
</tr>
<tr class="tblcellseparator">

</tr>
</table>
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you want to put a checkbox where you have the
<INPUT TYPE=CHECKBOX NAME="maillist">
tag? You need to place that inside of a set of table data tags:

In your code sample, the input tag is between table row tags, but not inside a table data tag. I'm not sure what the (X)HTML specifications say to do (if anything since it is technically incorrect markup), but most browsers will render anything placed between <table> tags, but not inside of <td> (table data) or <th> (table header) tags before the table. Some browser may even ignore such erroneous entities.
 
Liz Brown
Ranch Hand
Posts: 112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to state that with html tag in struts?
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

That would render an input tag of:

<input type=�checkbox� name=�foo� value=�on�>

The property attribute is the only required attribute for the <html:checkbox> tag. You can look at the what the various other attributes are and what they are used for in the documentation available at: http://struts.apache.org/userGuide/struts-html.html#checkbox
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic