Welcome to WebmasterWorld Guest from 54.167.29.212

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)



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 :(

dave_f

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

10+ Year Member



Hi

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

DrDoc

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