Re: [WebDNA] Some JS help please

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105065
interpreted = N
texte = Stuart, Try this instead. Untested, but it should work? What the script essentially does is toggle the height attribute of the "infocontainer" div from 80px to auto. function toggleText2() { var ele = document.getElementById("infocontainer"); var text = document.getElementById("infotrigger"); if(ele.style.height == "80px") { ele.style.display = "visible"; text.innerHTML = "[+] more info"; } else { ele.style.display = "block"; text.innerHTML = "[-] less info"; } } Marc Stuart Tremain wrote: > A development site I am working on: > > http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/lextra-mouse-rug/ > > The red "[+] more info" will show more text when clicked and then less when "[-] less info" is clicked. > > Now click "[+] more info" again and instead of seeing "[-] less info" you see "[+] more info" . > > How do I fix this ? > > Regards > > Stuart Tremain > IDFK Web Developments > AUSTRALIA > webdna@idfk.com.au > > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 > . > -- ------------------------------------------- Marc Thompson Software Engineer Office of Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Some JS help please (Stuart Tremain 2010)
  2. Re: [WebDNA] Some JS help please (Stuart Tremain 2010)
  3. Re: [WebDNA] Some JS help please (Stuart Tremain 2010)
  4. Re: [WebDNA] Some JS help please (Marc Thompson 2010)
  5. Re: [WebDNA] Some JS help please (Lawrence 2010)
  6. [WebDNA] Some JS help please (Stuart Tremain 2010)
Stuart, Try this instead. Untested, but it should work? What the script essentially does is toggle the height attribute of the "infocontainer" div from 80px to auto. function toggleText2() { var ele = document.getElementById("infocontainer"); var text = document.getElementById("infotrigger"); if(ele.style.height == "80px") { ele.style.display = "visible"; text.innerHTML = "[+] more info"; } else { ele.style.display = "block"; text.innerHTML = "[-] less info"; } } Marc Stuart Tremain wrote: > A development site I am working on: > > http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/lextra-mouse-rug/ > > The red "[+] more info" will show more text when clicked and then less when "[-] less info" is clicked. > > Now click "[+] more info" again and instead of seeing "[-] less info" you see "[+] more info" . > > How do I fix this ? > > Regards > > Stuart Tremain > IDFK Web Developments > AUSTRALIA > webdna@idfk.com.au > > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 > . > -- ------------------------------------------- Marc Thompson Software Engineer Office of Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Marc Thompson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Our Webcat site launched (1997) WebCat2b15MacPlugin - [protect] (1997) OLD PROBLEM (1997) Error:Too many nested [xxx] contexts (1997) [OT] Dedicated Image Uploader/Server [/OT] (2003) Searching for a Blank Field (2000) Transfer of data from Invoice to thank you templates (1998) WCS Newbie question (1997) Can't ping (problem with [shell]) SOLVED (2006) Another question (1997) [HIDEIF] inside [FOUNDITEM] (1997) Encyption mail was Suggestions for Topics ... (1998) Editing the search string (1997) [WebDNA] triggers executed at boot instead of scheduled time (2011) Ship to list (2005) Logical and or in [hideif] (1997) Bad Cookie / Internet Option / Internet Explorer (2004) Conditional searching & displaying (1997) problems with WebCat-Plugin () RE: Clearing orders and database help! (1997)