[thelist] DHTML help

Duncan O'Neill dbaxo at ihug.co.nz
Wed Jun 12 19:58:01 CDT 2002


Hi all,

I'm trying to dynamically generate a table using
DOM methods. The cells are being assigned their
own IDs and each need links written in.

This is the relevant piece of code, which works
fine for PC/IE5 & N6, but not for Mac IE5;

...
[1]the_link = document.createElement("a");
[2]the_link.href="javascript:void(currentColor = \"" + hew + "\");";
[3]the_link.innerHTML =  hew;
[4]cell.appendChild(the_link);
[5]row.appendChild(cell);
...

I've tried two methods of doing this for MacIE5 ;

1) set a string value, and then assign that string
    value, containing the link info, to
    the_link.innerHTML. This won't work for MacIE5 when there
    are tags in the string.
2)  a) create a link element
     b) set that element's href attribute.
     c) create a text Node with the link text
     d) set the text Node as a child of the link element
     e) set the link element as a child of the cell.

Either way MacIE5 chokes on it. The table is large, so
writing it out in HTML is out of the question.

Any ideas or suggestions would be appreciated.

tia,

=====================================================
Duncan O'Neill
=====================================================




More information about the thelist mailing list