•
•
•
•
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 402,653 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 2,178 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: 689 | Replies: 1
![]() |
•
•
Join Date: Apr 2008
Posts: 17
Reputation:
Rep Power: 1
Solved Threads: 0
hi, i am new to this group. i cam across it when i was looking for help on the web with the informations that is out there.
i am a beginner website programmer. hint the word begginner. i am learning javascript and it is giving me a huge migraine.
i would like to know if anyone can help me understand how can i write a if else statement to onclick two images if one is < than 5 else > than 10
i know it sound easy but i been working on this part for a whole week!!
i am a beginner website programmer. hint the word begginner. i am learning javascript and it is giving me a huge migraine.
i would like to know if anyone can help me understand how can i write a if else statement to onclick two images if one is < than 5 else > than 10
i know it sound easy but i been working on this part for a whole week!!
•
•
Join Date: Apr 2008
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
hi, i am new to this group. i cam across it when i was looking for help on the web with the informations that is out there.
i am a beginner website programmer. hint the word begginner. i am learning javascript and it is giving me a huge migraine.
i would like to know if anyone can help me understand how can i write a if else statement to onclick two images if one is < than 5 else > than 10
i know it sound easy but i been working on this part for a whole week!!
I'm not exactly sure what you're trying to accomplish.
But there are plenty of way's to do this.
You can put an id into you image and pass itself(this) to the function.
ex.
<img id="img1" ... onclick="clickFunc(this)" JavaScript Syntax (Toggle Plain Text)
function clickFunc(obj){ if (id == img1"){ ... your code here } else if(id == 'somethingelse'){ ... } }
regards
Last edited by peter_budo : Apr 26th, 2008 at 2:29 pm. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Can't change CSS style for "onClick" text link (JavaScript / DHTML / AJAX)
- Clicked Link Countdown (HTML and CSS)
- Which browser do you design for? (HTML and CSS)
- Error while trying the update query (ASP)
- dynamic tables (ASP.NET)
- Move out java code from jsp (Java)
- Access Sub switchboard password protection (Visual Basic 4 / 5 / 6)
- Session variable (ASP.NET)
- Perl/CGI (Saving Data) Part III (Computer Science and Software Design)
- Perl/CGI (Reading Data) Part II (Computer Science and Software Design)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: submit button
- Next Thread: Load custom window with open.window function?


Linear Mode