dep
12-21-2005, 11:08 PM
I have the following HTML.
<li class="windowControl"><span id="detailsmaxlink"><img src="/images/refresh.gif" alt="Refresh" onclick="javascript:refresh('details')" class="refresh"><a href="javascript:maximize('details')">maximize</a></span></li>
I want to be able to replace the text "maximize" between <A HREF>...</A>
I don't know how to get to this via the DOM. i thought something like this would work.
document.getElementById('detailsmaxlink').childNodes[0].childNodes[0].nodeValue = 'restore'
but that doesn't work. What am I doing wrong?
<li class="windowControl"><span id="detailsmaxlink"><img src="/images/refresh.gif" alt="Refresh" onclick="javascript:refresh('details')" class="refresh"><a href="javascript:maximize('details')">maximize</a></span></li>
I want to be able to replace the text "maximize" between <A HREF>...</A>
I don't know how to get to this via the DOM. i thought something like this would work.
document.getElementById('detailsmaxlink').childNodes[0].childNodes[0].nodeValue = 'restore'
but that doesn't work. What am I doing wrong?