Re: [WebDNA] Some JS help please
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105072
interpreted = N
texte = --Apple-Mail-7-670784835Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=us-asciiSuccess !Marc, you were on the right track:if(ele.style.display =3D=3D "block")=20{ ele.style.display =3D ""; <<<<<<<<<<<< removed any =reference from heretext.innerHTML =3D "[+] more info 2"; }else {ele.style.display =3D "block";text.innerHTML =3D "[-] less info 1";}RegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 18/03/2010, at 3:36 PM, Stuart Tremain wrote:> I now have it working as a button, but want it to be text.>=20>=20> =http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/le=xtra-mouse-rug/>=20>=20>=20>=20> Regards>=20> Stuart Tremain> IDFK Web Developments> AUSTRALIA> webdna@idfk.com.au>=20>=20>=20>=20> On 18/03/2010, at 3:05 PM, Stuart Tremain wrote:>=20>> Marc>>=20>> Sorry but it makes no difference.>>=20>> I can't get the text to change after it has triggered 3 times.>>=20>>=20>> Regards>>=20>> Stuart Tremain>> IDFK Web Developments>> AUSTRALIA>> webdna@idfk.com.au>>=20>>=20>>=20>>=20>> On 18/03/2010, at 2:37 AM, Marc Thompson wrote:>>=20>>> 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.>>>=20>>> function toggleText2() {>>> var ele =3D document.getElementById("infocontainer");>>> var text =3D document.getElementById("infotrigger");>>> if(ele.style.height =3D=3D "80px") {>>> ele.style.display =3D "visible";>>> text.innerHTML =3D "[+] more info";>>> }>>> else {>>> ele.style.display =3D "block";>>> text.innerHTML =3D "[-] less info";>>> }>>> }>>>=20>>> Marc>>>=20>>> Stuart Tremain wrote:>>>> A development site I am working on:>>>>=20>>>> =http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/le=xtra-mouse-rug/>>>>=20>>>> The red "[+] more info" will show more text when clicked and then =less when "[-] less info" is clicked.>>>>=20>>>> Now click "[+] more info" again and instead of seeing "[-] less =info" you see "[+] more info" .>>>>=20>>>> How do I fix this ?>>>>=20>>>> Regards>>>>=20>>>> Stuart Tremain>>>> IDFK Web Developments>>>> AUSTRALIA>>>> webdna@idfk.com.au>>>>=20>>>>=20>>>>=20>>>>=20>>>> --------------------------------------------------------->>>> 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=3Dtopics&category=3D288>>>> .>>>>=20>>>=20>>> --=20>>> ------------------------------------------->>> Marc Thompson>>> Software Engineer>>> Office of Information Technology>>> University of Utah>>> 801.585.9264>>> marc.thompson@utah.edu>>> ------------------------------------------->>> --------------------------------------------------------->>> 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=3Dtopics&category=3D288>>=20>> --------------------------------------------------------->> 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=3Dtopics&category=3D288>=20> ---------------------------------------------------------> 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=3Dtopics&category=3D288--Apple-Mail-7-670784835Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=us-asciiSuccess !
Marc, you were on the right =track:
if(ele.style.display =3D=3D "block")
{
=ele.style.display =3D ""; = <<<<<<<<<<<< removed any =reference from here
=text.innerHTML =3D "[+] =more info 2";
=}
=else {
=ele.style.display =3D "block";
text.innerHTML =3D "[-] less info 1";
=}
Regards
Stuart =Tremain
IDFK Web Developments
AUSTRALIA
=div>
On 18/03/2010, at 3:36 PM, Stuart Tremain wrote:
I now =have it working as a button, but want it to be text.
http://t3.idfk.net/categories/travel-and-work-and=-play/desk-accessories/lextra-mouse-rug/Regards
Stuart Tremain
IDFK Web =Developments
AUSTRALIA
webdna@idfk.com.au
On =18/03/2010, at 3:05 PM, Stuart Tremain wrote:
Marc
Sorry but it =makes no difference.
I can't get the =text to change after it has triggered 3 =times.
Regards
Stuart =Tremain
IDFK Web =Developments
AUSTRALIA
webdna@idfk.com.au
On 18/03/2010, =at 2:37 AM, Marc Thompson wrote:
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 =3D =document.getElementById("infocontainer");
var text ==3D =document.getElementById("infotrigger");
=if(ele.style.height =3D=3D "80px") ={
ele.style.display =3D ="visible";
text.innerHTML =3D "[+] more =info";
=}
else ={
==ele.style.display =3D ="block";
text.innerHTML =3D "[-] 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 =<talk@webdna.us>.
To =unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
.
-- =
-------------------------------------------
=
Marc =Thompson
Software =Engineer
Office of Information =Technology
University of =Utah
801.585.9264
marc.thompson@utah.edu
-------------------------------------------
=
---------------------------------------------------------
This message is sent to you because you are subscribed =to
the mailing list =<talk@webdna.us>.
To unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
---------------------------------------------------------
This message is sent to you =because you are subscribed to
the mailing list =<talk@webdna.us>.
To =unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
---------------------------------------------------------
This message is sent to you because you are subscribed to
the =mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
=--Apple-Mail-7-670784835--
Associated Messages, from the most recent to the oldest:
--Apple-Mail-7-670784835Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=us-asciiSuccess !Marc, you were on the right track:if(ele.style.display =3D=3D "block")=20{ ele.style.display =3D ""; <<<<<<<<<<<< removed any =reference from heretext.innerHTML =3D "[+] more info 2"; }else {ele.style.display =3D "block";text.innerHTML =3D "[-] less info 1";}RegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 18/03/2010, at 3:36 PM, Stuart Tremain wrote:> I now have it working as a button, but want it to be text.>=20>=20> =http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/le=xtra-mouse-rug/>=20>=20>=20>=20> Regards>=20> Stuart Tremain> IDFK Web Developments> AUSTRALIA> webdna@idfk.com.au>=20>=20>=20>=20> On 18/03/2010, at 3:05 PM, Stuart Tremain wrote:>=20>> Marc>>=20>> Sorry but it makes no difference.>>=20>> I can't get the text to change after it has triggered 3 times.>>=20>>=20>> Regards>>=20>> Stuart Tremain>> IDFK Web Developments>> AUSTRALIA>> webdna@idfk.com.au>>=20>>=20>>=20>>=20>> On 18/03/2010, at 2:37 AM, Marc Thompson wrote:>>=20>>> 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.>>>=20>>> function toggleText2() {>>> var ele =3D document.getElementById("infocontainer");>>> var text =3D document.getElementById("infotrigger");>>> if(ele.style.height =3D=3D "80px") {>>> ele.style.display =3D "visible";>>> text.innerHTML =3D "[+] more info";>>> }>>> else {>>> ele.style.display =3D "block";>>> text.innerHTML =3D "[-] less info";>>> }>>> }>>>=20>>> Marc>>>=20>>> Stuart Tremain wrote:>>>> A development site I am working on:>>>>=20>>>> =http://t3.idfk.net/categories/travel-and-work-and-play/desk-accessories/le=xtra-mouse-rug/>>>>=20>>>> The red "[+] more info" will show more text when clicked and then =less when "[-] less info" is clicked.>>>>=20>>>> Now click "[+] more info" again and instead of seeing "[-] less =info" you see "[+] more info" .>>>>=20>>>> How do I fix this ?>>>>=20>>>> Regards>>>>=20>>>> Stuart Tremain>>>> IDFK Web Developments>>>> AUSTRALIA>>>> webdna@idfk.com.au>>>>=20>>>>=20>>>>=20>>>>=20>>>> --------------------------------------------------------->>>> 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=3Dtopics&category=3D288>>>> .>>>>=20>>>=20>>> --=20>>> ------------------------------------------->>> Marc Thompson>>> Software Engineer>>> Office of Information Technology>>> University of Utah>>> 801.585.9264>>> marc.thompson@utah.edu>>> ------------------------------------------->>> --------------------------------------------------------->>> 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=3Dtopics&category=3D288>>=20>> --------------------------------------------------------->> 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=3Dtopics&category=3D288>=20> ---------------------------------------------------------> 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=3Dtopics&category=3D288--Apple-Mail-7-670784835Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=us-asciiSuccess !
Marc, you were on the right =track:
if(ele.style.display =3D=3D "block")
{
=ele.style.display =3D ""; = <<<<<<<<<<<< removed any =reference from here
=text.innerHTML =3D "[+] =more info 2";
=}
=else {
=ele.style.display =3D "block";
text.innerHTML =3D "[-] less info 1";
=}
Regards
Stuart =Tremain
IDFK Web Developments
AUSTRALIA
=div>
On 18/03/2010, at 3:36 PM, Stuart Tremain wrote:
I now =have it working as a button, but want it to be text.
http://t3.idfk.net/categories/travel-and-work-and=-play/desk-accessories/lextra-mouse-rug/Regards
Stuart Tremain
IDFK Web =Developments
AUSTRALIA
webdna@idfk.com.au
On =18/03/2010, at 3:05 PM, Stuart Tremain wrote:
Marc
Sorry but it =makes no difference.
I can't get the =text to change after it has triggered 3 =times.
Regards
Stuart =Tremain
IDFK Web =Developments
AUSTRALIA
webdna@idfk.com.au
On 18/03/2010, =at 2:37 AM, Marc Thompson wrote:
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 =3D =document.getElementById("infocontainer");
var text ==3D =document.getElementById("infotrigger");
=if(ele.style.height =3D=3D "80px") ={
ele.style.display =3D ="visible";
text.innerHTML =3D "[+] more =info";
=}
else ={
==ele.style.display =3D ="block";
text.innerHTML =3D "[-] 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 =<talk@webdna.us>.
To =unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
.
-- =
-------------------------------------------
=
Marc =Thompson
Software =Engineer
Office of Information =Technology
University of =Utah
801.585.9264
marc.thompson@utah.edu
-------------------------------------------
=
---------------------------------------------------------
This message is sent to you because you are subscribed =to
the mailing list =<talk@webdna.us>.
To unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
---------------------------------------------------------
This message is sent to you =because you are subscribed to
the mailing list =<talk@webdna.us>.
To =unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
---------------------------------------------------------
This message is sent to you because you are subscribed to
the =mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: =<talk-leave@webdna.us>
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=3Dtopics&category=3D288
=--Apple-Mail-7-670784835--
Stuart Tremain
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:
More DateMath problems (1997)
database editor add field, etc. (2005)
[ShowNext] feature in 2.0 (1997)
Searching for Email Address (2004)
Uh...can someone help me out with the b10? (1997)
[OT] Forums - check it out (2005)
Help name our technology! (1997)
Listfiles and nothing found (2001)
RE: PIXO support (1997)
syntax question, not in online refernce (1997)
Netscape 3.01 can't see db in form (1997)
Error handling for accountNum (1997)
[BULK] [WebDNA] [BULK] WebDNA 7 - Ready or Not ?? I'm not sure... (2011)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
syntax question, not in online refernce (1997)
Error Lob.db records error message not name (1997)
Reversed words (1997)
UPPERCASE (1997)
WebTen? (1997)
Help with searching dates from mysql dump & searching (2006)