Thread: accessing table cell attributes
Results 1 to 2 of 2
Related
-
Scrollbar in a cell in a table? Forum: HTML Forum
Replies: 6 -
Scroll bar in table cell help Forum: HTML Forum
Replies: 14 -
table cell background Forum: CSS Forum
Replies: 3 -
manipulate table cell Forum: Javascript Forum
Replies: 3
-
04-01-2003, 01:16 PM #1
accessing table cell attributes
I have a large table that I place no data in but just
colors but as you pass over cells I have information in
the ID and TITLE attributes of the td tag. I am trying
now to place the TITLE attribute value into a text field
in a form when the mouse is clicked over the cell. I have all
the code working except getting the value of the TITLE
attribute. I have looked and looked and tried various
code but no success.
I thought it would be something like
document.td.title
or
document.td.getAttribute("title")
or some variation of this
-
04-01-2003, 03:36 PM #2
Hiya. Welcome to the forums.
Because it needs a specific html element, that always tells you you need to access the ID of the tag to get any results. Here is a simple script I did to show how I accessed this -
Code:<h1 id="thisisit" title="Badger Badger">Stoaty</h1> <script language="JavaScript"> alert(thisisit.title); </script>
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum