This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Show - Hide Functionality Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Show - Hide Functionality" Watch "Show - Hide Functionality" New topic
Author

Show - Hide Functionality

Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
I have to hide and show a particular block of data.

I need to use the <div> inside an iterator. The functionality is working for the 1st row alone. For the other iterations, the sow-hide using div is not working.

Please help.


Thanks,


$Hi/\bEr
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Just as in your other post, we can't help you if you don't give us the information needed. How can we possibly guess what's wrong?

Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

P.S. Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along. Please read this for more information.
Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252


The above is the part of my code. I want to display/hide a row using div and javascript. But, its working for 1st row of data alone.


Thanks,
Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252



In this code, the div inside iterator is not working, means as id is constant, the first row alone is working. the other rows which are shown dynamically are not working. i want to assign the div ids dynamically and make some changes in javascript. i need help to do both of these.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
ids in html are singular. You can ot have more than one element with the same id. So you need t increment your ids or find some other way to hide them.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Show - Hide Functionality
 
Similar Threads
how to hide and show contents with struts2 div tag
changing the image on clicking it
Floating div
what is Abstraction
problem in paging using javascript