Thomas said:
I am trying to produce a table dynamically when the user presses "add to
queue". It works great in Mozilla, but it is formatted incorrectly in IE.
What I meant by the checkbox was that it should be checked by default. IE
doesn't do this while mozilla does. Here's a link:
http://helios.acomp.usf.edu/~torr2/test/test.php
Specifically, the checkbox is not checked and the css classes don't seem to
be working. This only happens in IE and I can't figure it out.
Thanks For any help you can give,
Tom
I checked your code. *_Every_* single place where you use setAttribute,
there is a more efficient and better DOM 2 attribute to do your
instruction. It is widely known that setAttribute is not well supported
or working well on many browsers when corresponding DOM 2 attribute work
a lot better.
I would use insertRow and insertCell rather than createElement("tr") and
createElement("td") for several reasons I won't detail here.
Your code at times is very confusing. E.g.:
var row = document.createElement("tr");
var td = new Array();
Now, tell others viewing and reviewing your code (or even just yourself
in 3 months from now) that row is a reference to a row and td is a
reference to an array...
You're misusing innerHTML also IMO. innerHTML is best used to insert
html code, not to insert a text node or to modify the node value of a
text node.
Some other instructions will certainly create problems on browsers and
some PC with modest system resources. You use 4 levels of nested tables
and your page design only needs 1 table; 4 levels of nested tables for
such page is unjustified and will add to an already great burden (memory
management, DHTML performance, overall increased complexity). You resort
to 20 spacer filling gif images, deprecated attributes (e.g. font,
nowrap, etc.), document.write techniques along with DOM 2 methods. Some
of your instructions are correctly constructed but I wonder why you need
to create such a complex page. I.e. do you really need to create a 2
dimensions array variable to store hidden values? Have you considered
that such page could be too demanding for modest system resources? For
sure, some iterative instructions (having 13 DOM node references) will
be difficult to accomplish on some systems: some systems will just crash.
<td nowrap><font class="label"> Year </font></td>
If this cell within a 4th level of nested table must not wrap, then
there is no need to use : it's redundant, unneeded.
Everywhere you use (more than 100) in 20 cells, you could just
replace and remove all these (tag soup) and all <font> tags with a
simple one-line-long css rule.
You use very recent modern attributes and methods with a very old,
deprecated, non-recommendable webpage design.
DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html