faqts : Computers : Programming : Languages : JavaScript : Tables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 31 people (65%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Is it possible to change cell properties from a hyperlink that is in it?

Aug 29th, 2000 16:10
Martin Honnen, stéphane royer,


Yes, with IE4+ and NN6:

<TABLE BORDER="1">
<TR>
<TD BGCOLOR="orange">
<A HREF="javascript: void 0"
   ONCLICK="var cell = this.parentNode ? this.parentNode : 
this.parentElement;
            if (cell) {
              if (cell.width)
                cell.width = parseInt(cell.width) + 100;
              else
                cell.width = 100;
alert(cell.width)
            }"
>
click
</A>
</TD>
</TR>
</TABLE>