-
referencing a span id in javascript
Hi,
I'm trying to dynamically show and hide tablecells. The table cells are enclosed
in span tags and are dynamically created using ASP. Using the onclick event
of the span tag I call a function to hide and show cells,passing the span
id to the function. Depending on the id other cells are either shown of hidden.
I can change the current cell by passing 'this', and also any cells that
were static in the page, but when it is dynamically created using ASP I get
an error. The error says that the id of span, spanid.style.visibility, is
not an object.
How can I reference these dynamic span id's in javascript.
Can anyone help.
Thanks
Craig
-
Re: referencing a span id in javascript
Hi
I am not an expert but I am thinking that you should proberly use the collections
array for span tags, if one exists... ?
"Craig Roberge" <craigroberge@bigfoot.com> wrote:
>
>Hi,
>
>I'm trying to dynamically show and hide tablecells. The table cells are
enclosed
>in span tags and are dynamically created using ASP. Using the onclick event
>of the span tag I call a function to hide and show cells,passing the span
>id to the function. Depending on the id other cells are either shown of
hidden.
>
>I can change the current cell by passing 'this', and also any cells that
>were static in the page, but when it is dynamically created using ASP I
get
>an error. The error says that the id of span, spanid.style.visibility, is
>not an object.
>
>How can I reference these dynamic span id's in javascript.
>
>Can anyone help.
>
>Thanks
>Craig
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks