homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

Forum Home Post A Reply

my profile | directory login | | search | faq | forum home

» The Geek Culture Forums! (new server edition) » Other Geeky Stuff » Ask a Geek! » Javascript help » Post A Reply

Post A Reply
Login Name:
Password (max 13 characters):
Message Icon: Icon 1     Icon 2     Icon 3     Icon 4     Icon 5     Icon 6     Icon 7    
Icon 8     Icon 9     Icon 10     Icon 11     Icon 12     Icon 13     Icon 14    

HTML is not enabled.
UBB Code™ is enabled.


Instant Graemlins Instant UBB Code™
Smile   Frown   Embarrassed   Big Grin   Wink   Razz  
Cool   Roll Eyes   Mad   Eek!   Confused   Happytears  
blush   Beard of Peter Gabriel!   crazy   tired   ohwell   evil  
shake head   cry baby   hearts   weep   devil wand   thumbsup  
thumbsdown   Geek   Applause   Angel   Envy    
Insert URL Hyperlink - UBB Code™   Insert Email Address - UBB Code™
Bold - UBB Code™   Italics - UBB Code™
Quote - UBB Code™   Code Tag - UBB Code™
List Start - UBB Code™   List Item - UBB Code™
List End - UBB Code™   Image - UBB Code™

What is UBB Code™?

Disable Graemlins in this post.


T O P I C     R E V I E W
Titanium Warrior
Member # 1885
 - posted September 28, 2006 22:49
Hi guys... looking for a little help... trying to make an expanding/collapsing text box, and I have a link that can expand and collapse it, but I also wanted to add another collapse link the actual expanded box.

The example can be found here http://www.columbiafuels.com/bio_heat_myths.htm

There isn't anything actually wrong with it, it's just that I've added a second link to collapse the box, but I wanted to make both links switch from 'close' back to 'expand'

Jace Raven
Member # 2444
 - posted September 29, 2006 00:57
scrap the javascript in this case. Use CSS.
Member # 780
 - posted September 29, 2006 08:22
Originally posted by Jace Raven:
scrap the javascript in this case. Use CSS.

Wrong answer. CSS cannot readily do what he's asking for. I might say that it's a kind of ugly thing to do, but if that's the client request, so be it.

Unfortunately, I can't really look at it in depth right now - basically, you need to have a single function that is passed parameters, which changes the text of *both* links upon clicking it. Currently, it's very broken, as if you toggle via different buttons, it sort of works, but looks funky.

Think along the lines of:
function toggle_section(section_name)

Then, have appropriately IDed sections and links, such that a simple function can get the elements and alter them accordingly.

The *most* important part is that you put everything in tidy DIVs with links that work. Ideally, I'd suggest that it degrades gracefully to showing everything, and maybe have the links go to a 'more info' page. This way someone with Javascript disabled...or a screen reader, stands a better chance of getting at your information.

Get this extension, and learn to use it to the fullest:
Titanium Warrior
Member # 1885
 - posted September 29, 2006 08:39
Thanks... I took a different approach and I like the results better now. Thanks D-man, you gave me some thought starters and then I took a different approach that works great.


Contact Us | Geek Culture Home Page

© 2018 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0

homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam