homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Calculate values in <div>
Calculate values in <div>
deian

10+ Year Member



 
Msg#: 1016 posted 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

10+ Year Member



 
Msg#: 1016 posted 4:11 pm on Dec 15, 2003 (gmt 0)

Hi

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

DrDoc

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



 
Msg#: 1016 posted 4:13 pm on Dec 15, 2003 (gmt 0)

Welcome to Webmaster World, both of you! :)

Glad to have ya! ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved