Posted by bradley_d_watkins on 11/26/07 11:54
Hi,
This is what can be seen from 'view source'. Currently Im trying to
gain access to the second table, but no ID was given to it when it was
created...
I have tried this:
var mytables = document.getElementsByTagName('table')
alert(mytables[0].rows[1].innerHTML)
var mytables2 = document.getElementsByTagName('table').item(1)
alert(mytables2.rows[1].innerHTML)
The first one alert returns the first table, but the second alert gives
an error....
.....
<table cellspacing=0 cellpadding=0>
<tr>
<td nowrap colspan=5 bgcolor=black><img src=/images/wi/nothing.gif
height=1></td>
</tr>
<tr>
<td colspan=5 bgcolor=><img src=/images/bars/silver.gif width=74
height=10></td>
</tr>
<tr>
<td nowrap colspan=5 bgcolor=black><img src=/images/wi/nothing.gif
height=1></td>
</tr>
<tr>
<td width=40><font face="verdana" size="-2">0%</font></td>
<td width=20 align=center><font face="verdana"
size="-2">25%</font></td>
<td width=80 align=center><font face="verdana"
size="-2">50%</font></td>
<td width=20 align=center><font face="verdana"
size="-2">75%</font></td>
<td width=40 align=right><font face="verdana"
size="-2">100%</font></td>
</tr>
</table>
......
<!-- INPUT LAYOUT START -->
<table cellspacing=2 cellpadding=0 style="behavior:
url(/behaviors/rankedOrder2.htc)" p_questionType="multi" >
<tr>
<td nowrap><input tabindex="1" type="text" name="QTicked2_1"
size="3" value="" id="QTicked2_1"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_1">Island</LABEL></font></td>
</tr>
<tr>
<td nowrap><input tabindex="2" type="text" name="QTicked2_2"
size="3" value="" id="QTicked2_2"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_2">Seal</LABEL></font></td>
</tr>
<tr>
<td nowrap><input tabindex="3" type="text" name="QTicked2_3"
size="3" value="" id="QTicked2_3"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_3">Egypt</LABEL></font></td>
</tr>
<tr>
......
<td nowrap><input tabindex="4" type="text" name="QTicked2_4"
size="3" value="" id="QTicked2_4"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_4">Bike</LABEL></font></td>
</tr>
<tr>
<td nowrap><input tabindex="5" type="text" name="QTicked2_5"
size="3" value="" id="QTicked2_5"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_5">Greece</LABEL></font></td>
</tr>
<tr>
<td nowrap><input tabindex="6" type="text" name="QTicked2_6"
size="3" value="" id="QTicked2_6"> <font
face="verdana" size="-1" color="#990033"><LABEL
FOR="QTicked2_6">Egypt</LABEL></font></td>
</tr>
</table>
<!-- INPUT LAYOUT END -->
Navigation:
[Reply to this message]
|