Javascript Fun
by Ben Ocean <lists(at)TheWebsons.com>
|
Date: |
Sun, 25 Nov 2001 08:28:19 -0800 |
To: |
hwg-techniques(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Hi;
I have an HTML document with 4 tables in it. Table A has two tables in it
I'll call B and C. Table B has a table in it I'll call D. Table D has
several rows that each have one and only one definition. These have a
background color that I want to change onMouseOver. So, here's my script:
function color('here') {
for (var i=0;i<table[2].tr.length;i++){
if (i==here){
document.table[2].tr[1].td[0].value="bgcolor=\"#ff6633\"";
}
}
}
and here's what's in the body copy:
<td bgcolor="#cc3300" name="loads">
<font style="font: <dtml-var "sizeCalc(14,size(_.None,_))">px verdana">
<a href="Downloads/loads" onMouseOver="color('loads')"><font
style="color: #ffffff">Loads Calculator</a>
There may be *many* errors in this as I'm not a JS expert by any means. For
example, I'm not sure if this table is table #2 or table #3 (does B come
before D?) or if tables can even be referenced the way I'm trying with my
dot notation. Can you help me out?
TIA,
BenO
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA