•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 373,098 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,870 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 555 | Replies: 0
•
•
Join Date: Feb 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I want to swap two images back and forth based on a mouse click. eg + and -.
i am doing this on a tree structure based on the values extracted from the database.
eg
+ English
- Maths
- Trignometry
+ Chemistry
and the code which i am using is
Now the problem is that i am only able to do this image swapping on 'English'. But i want this for the entire TREE Structure based on the node which the user clicks.
Please help.....
i am doing this on a tree structure based on the values extracted from the database.
eg
+ English
- Maths
- Trignometry
+ Chemistry
and the code which i am using is
javascript Syntax (Toggle Plain Text)
<script language='javascript' type='text/javascript'> intImage = 2; function swapimage() { switch (intImage) { case 1: imgname.src = "plus.gif" intImage = 2 return(false); case 2: imgname.src = "minus.gif" intImage = 1 return(false); } } </script>
Now the problem is that i am only able to do this image swapping on 'English'. But i want this for the entire TREE Structure based on the node which the user clicks.
Please help.....
Last edited by peter_budo : Apr 1st, 2008 at 7:14 am. Reason: Keep It Organized - please use [code] tags
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
Similar Threads
- Help with Swapping Images onclick (JavaScript / DHTML / AJAX)
- Multiple Mouseover Events (JavaScript / DHTML / AJAX)
- Gateway 600YGR Motherboard???? (Motherboards, CPUs and RAM)
- Computer won't start, no image, no POST... (Troubleshooting Dead Machines)
- Please help!!! Upload script.. (PHP)
- PHP image swapping ? (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Onclick does not work in ie for multiple object
- Next Thread: falid flash on xhtml trans... plz help me



Threaded Mode