Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Calculate values in <div>

Calculate values in <div>



8:14 am on Dec 15, 2003 (gmt 0)


i'm trying to calculate some values in <div>, based on user interraction.

<div id="one">3</div>
<img src="sample.jpg" alt="" width="170" height="120" onclick="this.document.getElementById("one").value++">

but this is not working :(


4:11 pm on Dec 15, 2003 (gmt 0)

10+ Year Member


Try onclick='document.getElementById("one").firstChild.nodeValue++;'. This should work.


4:13 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to Webmaster World, both of you! :)

Glad to have ya! ;)


Featured Threads

Hot Threads This Week

Hot Threads This Month