• 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

how to add checkbox html tag?- urgent!

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to state that with html tag in struts?
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic