i'm looking for JS code that can change the contents of a span or div that will work in firefox, similar to http://www.faqts.com/knowledge_base/view.phtml/aid/7916 but FF compatiblei'm not sure if it is something i'm doing or what, but i can't get it to work
6/12/2006 5:03:19 PM
<script type="text/JavaScript">...function Tick() { document.getElementById("counterOne").innerHTML = TimeSince(2006, 5, 1, 0, 0); document.getElementById("counterTwo").innerHTML = TimeUntil(2006, 10, 30, 24, 0); }</script></head><body onload="window.tmr = setInterval(Tick, 999)" onunload="clearInterval(window.tmr)">...<span id="counterOne"><script type="text/JavaScript">document.write(TimeSince(2006, 5, 0, 0, 0))</script></span>
6/12/2006 6:57:52 PM
6/12/2006 7:47:01 PM
alright, i'm still having no luck, let me post some codehere's the function that gets called to modify the info in the span
function textCounter(field,cntfield,maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else cntfield.innerHTML = maxlimit - field.value.length;}
echo' <td nowrap style="vertical-align:top"><b><span id="counter' . $counter . '" name="counter['.$counter.']">400</span></b> characters remaining</td>'; echo' <td><textarea id="comments' . $counter . '" name="comments[' . $counter . ']" rows="4" cols="60" wrap maxlength="400" onKeyDown="textCounter(document.form.getElementByID(\'comments'.$counter.'\'),document.form.getElementByID(\'counter' . $counter . '\'),400)" onKeyUp="textCounter(document.form.getElementByID(\'comments'.$counter.'\'),document.form.getElementByID(\'counter' . $counter . '\'),400)"'; echo'>';
<td nowrap style="vertical-align:top"><b><span id="counter0" name="counter[0]">400</span></b> characters remaining</td><td><textarea id="comments0" name="comments[0]" rows="4" cols="60" wrap maxlength="400" onKeyDown="textCounter(document.form.getElementByID('comments0'),document.form.getElementByID('counter0'),400)" onKeyUp="textCounter(document.form.getElementByID('comments0'),document.form.getElementByID('counter0'),400)"></textarea></td>
6/12/2006 8:20:13 PM
<td><textarea id="comments0" name="comments[0]" rows="4" cols="60" wrap maxlength="400" onKeyDown="textCounter(document.getElementById('comments0'),document.getElementById('counter0'),400)" onKeyUp="textCounter(document.getElementById('comments0'),document.getElementById('counter0'),400)"></textarea></td>
6/12/2006 8:58:23 PM
WOOO it worksthx dude
6/12/2006 10:16:17 PM