• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic