F
F. Da Costa
Hi,
In the html (as shown below) there are some <a> tags I need to move into a map.
This is no problem (in Gecko) using the js below.
However, IE 5+ (nor 6) does not want to play.
It gives me an "undefined" error and basically does not give me the objects I expect.
Undoubtfully one *can* get a hold of these objects and obviously this is the question.
How does one do this in IE??
TIA,
Fermin DCG
======================================
html:
<table>
<tr id="1" class="segment">
<td>
<div class="tier2">
<a href="#" class="collapsed" onclick="openCloseSegment(this);"><span class="alt">[-] /</span></a>
<a href="#" title="Row title">Cat1</a>
<a href="#" onClick="hideUnhide(this)"><strong>Hide</strong>
</div>
</td>
<td><input type="checkbox" name="checkbox$0" onClick="setCheckbox(this);"/></td>
<td><input type="text" name="text2Edit$0" value="" align="right"/></td>
</tr>
<tr id="1-1" class="segment">
<td>
<div class="tier3">
<a href="#" class="collapsed" onclick="openCloseSegment(this);"><span class="alt">[-] /</span></a>
<a href="#" title="Row title">Cat1-1</a>
<a href="#" onClick="hideUnhide(this)"><strong>Hide</strong></a>
</div> </td>
<td><input type="checkbox" name="checkbox$1" onClick="setCheckbox(this);"/></td>
<td><input type="text" name="text2Edit$1" value="" align="right"/></td>
</tr>
</table>
============================================
..js:
for (var i=0; i < rows.length; i++) {
r = rows;
if (r.className=="segment") {
_segmentRows[r.id]=r;
r.open="0";
td = r.childNodes[1]; alert(td.localName);
div = td.childNodes[1]; alert(div.localName);
a = div.childNodes[1]; alert(a.localName);
_row2a[r.id] = a;
assert("mismatch _row2a[r.id] = a", (_row2a[r.id] == a) && (r.className="segment") );
}
In the html (as shown below) there are some <a> tags I need to move into a map.
This is no problem (in Gecko) using the js below.
However, IE 5+ (nor 6) does not want to play.
It gives me an "undefined" error and basically does not give me the objects I expect.
Undoubtfully one *can* get a hold of these objects and obviously this is the question.
How does one do this in IE??
TIA,
Fermin DCG
======================================
html:
<table>
<tr id="1" class="segment">
<td>
<div class="tier2">
<a href="#" class="collapsed" onclick="openCloseSegment(this);"><span class="alt">[-] /</span></a>
<a href="#" title="Row title">Cat1</a>
<a href="#" onClick="hideUnhide(this)"><strong>Hide</strong>
</div>
</td>
<td><input type="checkbox" name="checkbox$0" onClick="setCheckbox(this);"/></td>
<td><input type="text" name="text2Edit$0" value="" align="right"/></td>
</tr>
<tr id="1-1" class="segment">
<td>
<div class="tier3">
<a href="#" class="collapsed" onclick="openCloseSegment(this);"><span class="alt">[-] /</span></a>
<a href="#" title="Row title">Cat1-1</a>
<a href="#" onClick="hideUnhide(this)"><strong>Hide</strong></a>
</div> </td>
<td><input type="checkbox" name="checkbox$1" onClick="setCheckbox(this);"/></td>
<td><input type="text" name="text2Edit$1" value="" align="right"/></td>
</tr>
</table>
============================================
..js:
for (var i=0; i < rows.length; i++) {
r = rows;
if (r.className=="segment") {
_segmentRows[r.id]=r;
r.open="0";
td = r.childNodes[1]; alert(td.localName);
div = td.childNodes[1]; alert(div.localName);
a = div.childNodes[1]; alert(a.localName);
_row2a[r.id] = a;
assert("mismatch _row2a[r.id] = a", (_row2a[r.id] == a) && (r.className="segment") );
}