•
•
•
•
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 374,173 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,433 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: 489 | Replies: 1 | Solved
![]() |
•
•
Join Date: Feb 2008
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
i have three "buttons". when each is pressed i want to 1.) detect if it is not hidden, if so, return (do nothing). 2.) detect if another button is not hidden, if so i want it to hide that button and continue to the third. 3.) i want it to perform an action slidedown() which makes it not hidden.
i came up with this code.
very simple, and it works. However, i wanted it to complete the second task of checking if 'mainA' 'mainB' or 'mainC' had been pressed and WAIT for that to finish until moving on to step three. But that did not happen. it wasn't too pretty.
i tried a way of doing this, but needless to say it didn't work. any suggestions?
i came up with this code.
javascript Syntax (Toggle Plain Text)
function toggleSlide(objname){ if(document.getElementById(objname).style.display != "none")return; if(document.getElementById('mainA').style.display != "none") slideup('mainA'); if(document.getElementById('mainB').style.display != "none") slideup('mainB'); if(document.getElementById('mainC').style.display != "none") slideup('mainC'); if(document.getElementById(objname).style.display == "none") slidedown(objname); }
very simple, and it works. However, i wanted it to complete the second task of checking if 'mainA' 'mainB' or 'mainC' had been pressed and WAIT for that to finish until moving on to step three. But that did not happen. it wasn't too pretty.
i tried a way of doing this, but needless to say it didn't work. any suggestions?
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
Similar Threads
- Removal of "Home Search Assistant", "Search Extender", & "Shopping Wizard" (Viruses, Spyware and other Nasties)
- PC will not boot past first "FF" (Troubleshooting Dead Machines)
- Help deleting a file that's "in use" (Windows NT / 2000 / XP / 2003)
- Wireless "B" networks not working anymore (Networking Hardware Configuration)
- "HELP" Inet Explorer wont open (Windows NT / 2000 / XP / 2003)
- Keyboard Issue: New IE window opens when using the "L" key. (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: calculating values using onclick
- Next Thread: How do i color something like a blueprint?


Linear Mode