473,378 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to show/hide rows when using iterate tag...

Hi ..
I have a logic:iterate tag which will display 5 rows each row with a drop downlist and 2 textfields.now by default all the rows will be shown.how do i hide all the rows except the first one.i know how to show/hide a row when its not dynamic.but i dont know how to do it when its logic iterate tag.
Expand|Select|Wrap|Line Numbers
  1. <logic:iterate indexId="index" id="phoneItem"  name="nameForm" property="results">
  2. <%
  3. String dropdownType = "results["+index+"].dropdownType";
  4. String firstName = "results["+index+"].firstName";
  5. String lastName = "results["+index+"].lastName";
  6. String layerName= "name["+index+"]";
  7. %>
  8. <tr id="<%=layerName%>" style="display:''">
  9.  <td></td>
  10. <td>
  11.   <html:select name="nameform"    property="<%= dropdownType %>">
  12.       <html:option value=""><bean:message key="default.select"       bundle="defaults"/></html:option>
  13. <html:optionsCollection property="names.prefix" />
  14. </html:select>
  15. </td> 
  16. <td>
  17. <input type="text" property="<%=firstName %>" />
  18. </td>
  19. <td>
  20. <input type="text" property="<%=lasName %>" />
  21. </td>
  22. </tr>
  23. </logic:iterate>
  24.  
Please it would be great if someone could help me out with it.

Thanks
Prathna
Feb 18 '08 #1
1 2325
acoder
16,027 Expert Mod 8TB
Within the style attribute, check that the index is not the first index. If it isn't, use "none".
Feb 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: KathyB | last post by:
Hi, totally new to the div show/hide thing. I have some rows in a table. When I first load the page, I only want to see divs where the divID=ForView. When I load now, I see BOTH rows...even...
2
by: Mark | last post by:
Hi, I need to be able to have five different links and when when someone clicks to show row 2, row 1 automatically hides. Right now all i can figure out is a link that will show but then you...
20
by: WindAndWaves | last post by:
Hi Gurus I was wondering if you can send me in the right direction: I have a table with about 300 rows. I want to make all of them invisible and when a user enters a code in a form then make...
2
by: Mateo | last post by:
Hi! I have a litle JS problem.... I'm trying to make show/hide table JS function, but my show/hide table function works only on IE.... It works in mozilla partially. Actually,every time when I...
3
by: evanburen | last post by:
I'm using this to hide rows in a table created from ASP. This works well but I would like to also be able to 'Show' the records again that there hidden by removeEvents( ). Thanks. function...
11
by: jimstruckster | last post by:
I have a table with 10 rows, I want all rows except for the first to be hidden when the page first opens up. If the user puts a value in a text box in the first row then I want the second row to...
2
by: Scamjunk | last post by:
I have been desperately looking for a treeview-type solution for my problem for the past three weeks and have been greatly unsuccessful. I am totally new to the world of XSLT and I *don't know*...
1
by: jbreaker | last post by:
Hi - I have a table with about 30 rows, which contain a checkbox and a bit of text each. What I'm trying to find a way to do is to have 2 buttons at the bottom of the page - HIDE & SHOW. When the...
18
by: Liquidtouch | last post by:
I have been searching on this for awhile and cant find anything and playing around with it got me no where. I will start with what I am after and then explain what I have. I have a table with 3...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.