Welcome to WebmasterWorld Guest from 54.147.44.13

Forum Moderators: open

Message Too Old, No Replies

Calculate values in <div>

Calculate values in <div>

     

deian

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

Inactive Member
Account Expired

 
 


hi

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)

New User

10+ Year Member

joined:Dec 15, 2003
posts:6
votes: 0


Hi

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

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

Senior Member

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

joined:Mar 15, 2002
posts:6807
votes: 0


Welcome to Webmaster World, both of you! :)

Glad to have ya! ;)