Connecting Tech Pros Worldwide Forums | Help | Site Map

How to show/hide ALL objects with a certain id?

KathyB
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi, I'm using a simple show function, called from a button.

function show(rowId) {
var hideRow = "View_" + rowId
document.getElementById(showRow).style.display ="block";
}

QUESTION: I'm using xsl and can have more than one table row with the
specific rowId, and I want ALL of them to show when the button is
clicked for that rowId. But although the html source is there, I only
get the first row with the rowId.

New to this...where am I going wrong please.

Thanks, Kathy

p.s. IE 5.5 used only on intranet...so no cross browser needed.

Hywel Jenkins
Guest
 
Posts: n/a
#2: Jul 20 '05

re: How to show/hide ALL objects with a certain id?


In article <75e8d381.0309291057.2773922e@posting.google.com >,
KathyBurke40@attbi.com says...[color=blue]
> Hi, I'm using a simple show function, called from a button.
>
> function show(rowId) {
> var hideRow = "View_" + rowId
> document.getElementById(showRow).style.display ="block";
> }
>
> QUESTION: I'm using xsl and can have more than one table row with the
> specific rowId, and I want ALL of them to show when the button is
> clicked for that rowId. But although the html source is there, I only
> get the first row with the rowId.
>
> New to this...where am I going wrong please.
>[/color]
You can't have more than one object with a particular ID. IDs are
unique. Set the rows to have the same class and parse the DOM looking
for the class that matches your criteria.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Closed Thread