Re: [WebDNA] On click show hidden include

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103941
interpreted = N
texte = --Apple-Mail-33--120902118 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes This can be a very handy technique. Basically, you put the hidden =20 content inside
=85
tags, with the "visibility: hidden" =20 style. Outside that div block, you include a button / image / link =20 that triggers Javascript (which is a totally different thing than =20 "Java", though the language names create great confusion for many) =20 which changes this "visibility" setting. A simple example page: Hidden Block Test TOGGLE =20= HIDDEN BLOCK
THIS = =20 IS THE HIDDEN BLOCK.
YOU CAN PUT WHATEVER YOU WANT IN HERE.

Brian Fries BrainScan Software On Nov 4, 2009, at 9:50 AM, Rob wrote: > Has anyone ever made a hidden include that automagically becomes =20 > visible when a button is clicked? Kind of like on click, show these =20= > additional form fields? I'm not a java dude, but could sure use this =20= > in a lot of areas, and get asked about it a lot. > > Any help would be much appreciated ... > > Rob > --------------------------------------------------------- > 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-33--120902118 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 This can be a very handy = technique. Basically, you put the hidden content inside <div> =85 = </div> tags, with the "visibility: hidden" style. Outside that div = block, you include a button / image / link that triggers Javascript = (which is a totally different thing than "Java", though the language = names create great confusion for many) which changes this = "visibility" setting. A simple example page:

<html>
<head>
<title>Hidden Block = Test</title>

<script = language=3D"javascript">
function = showDiv(theName) {
d =3D = document.getElementsByTagName('div');
= if (d) {
for(i=3D0;i<d.length;i++){
= if (d[i].id =3D=3D theName) {
= if (d[i].style.visibility =3D=3D 'visible') = {
= d[i].style.visibility =3D 'hidden';
= d[i].style.display =3D = 'none';
= } = else {
= d[i].style.visibility =3D = 'visible';
= d[i].style.display =3D 'block';
= }
= }
}
}
}
</script>
</head>
<body>

<a href=3D"#" = onClick=3D"showDiv('hiddenblock'); return false;">TOGGLE HIDDEN = BLOCK</a><br>
<div = id=3D"hiddenblock" style=3D"visibility: hidden; display:none;">THIS = IS THE HIDDEN BLOCK.<BR>YOU CAN PUT WHATEVER YOU WANT IN = HERE.<br></div><br>
</body>
</html>

Brian = Fries
BrainScan Software


On Nov 4, 2009, at 9:50 AM, Rob wrote:

Has anyone ever made a hidden include that automagically = becomes visible when a button is clicked? Kind of like on click, show = these additional form fields? I'm not a java dude, but could sure = use this in a lot of areas, and get asked about it a lot.

Any = help would be much appreciated = ...

Rob
--------------------------------------------------------= -
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>
archi= ves: http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=

= --Apple-Mail-33--120902118-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] On click show hidden include (Rob 2009)
  2. Re: [WebDNA] On click show hidden include (Brian Fries 2009)
  3. [WebDNA] On click show hidden include (Rob 2009)
--Apple-Mail-33--120902118 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes This can be a very handy technique. Basically, you put the hidden =20 content inside
=85
tags, with the "visibility: hidden" =20 style. Outside that div block, you include a button / image / link =20 that triggers Javascript (which is a totally different thing than =20 "Java", though the language names create great confusion for many) =20 which changes this "visibility" setting. A simple example page: Hidden Block Test TOGGLE =20= HIDDEN BLOCK
THIS = =20 IS THE HIDDEN BLOCK.
YOU CAN PUT WHATEVER YOU WANT IN HERE.

Brian Fries BrainScan Software On Nov 4, 2009, at 9:50 AM, Rob wrote: > Has anyone ever made a hidden include that automagically becomes =20 > visible when a button is clicked? Kind of like on click, show these =20= > additional form fields? I'm not a java dude, but could sure use this =20= > in a lot of areas, and get asked about it a lot. > > Any help would be much appreciated ... > > Rob > --------------------------------------------------------- > 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-33--120902118 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 This can be a very handy = technique. Basically, you put the hidden content inside <div> =85 = </div> tags, with the "visibility: hidden" style. Outside that div = block, you include a button / image / link that triggers Javascript = (which is a totally different thing than "Java", though the language = names create great confusion for many) which changes this = "visibility" setting. A simple example page:

<html>
<head>
<title>Hidden Block = Test</title>

<script = language=3D"javascript">
function = showDiv(theName) {
d =3D = document.getElementsByTagName('div');
= if (d) {
for(i=3D0;i<d.length;i++){
= if (d[i].id =3D=3D theName) {
= if (d[i].style.visibility =3D=3D 'visible') = {
= d[i].style.visibility =3D 'hidden';
= d[i].style.display =3D = 'none';
= } = else {
= d[i].style.visibility =3D = 'visible';
= d[i].style.display =3D 'block';
= }
= }
}
}
}
</script>
</head>
<body>

<a href=3D"#" = onClick=3D"showDiv('hiddenblock'); return false;">TOGGLE HIDDEN = BLOCK</a><br>
<div = id=3D"hiddenblock" style=3D"visibility: hidden; display:none;">THIS = IS THE HIDDEN BLOCK.<BR>YOU CAN PUT WHATEVER YOU WANT IN = HERE.<br></div><br>
</body>
</html>

Brian = Fries
BrainScan Software


On Nov 4, 2009, at 9:50 AM, Rob wrote:

Has anyone ever made a hidden include that automagically = becomes visible when a button is clicked? Kind of like on click, show = these additional form fields? I'm not a java dude, but could sure = use this in a lot of areas, and get asked about it a lot.

Any = help would be much appreciated = ...

Rob
--------------------------------------------------------= -
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>
archi= ves: http://mail.webdna.us/l= ist/talk@webdna.us
old archives: http://dev.webdna.us/TalkLi= stArchive/
Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288=

= --Apple-Mail-33--120902118-- Brian Fries

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:

PCS Frames-Default page is solution! (1997) WebCat2 - Getting to the browser's username/password data (1997) [WebDNA] Error: Can't open order file. Ignoring [OrderFile] context Error: Error: expected [/APPLICATION], but found [/!] instead[/!] (2011) unable to launch acgi in WebCat (1997) Sendmail problem (2002) Execute Applescript (1997) WebCat2 - [format thousands] (1997) charge.com (2005) Stopping bad HTML propagation ? (1997) [WebDNA] Anyone know how to setup RSS on a website? (2012) sort problems....bug or brain fart? (1997) MacFinder -- a new WebDNA web site (1998) Need help... (1997) creator code (1997) Header info in content (1998) WebTen and WebCat (1997) No luck with taxes (1997) [OT] Domain Name Scam (2000) More on the email templates (1997) WebCatalog for guestbook ? (1997)