Forums

ASP

This topic is locked

Instant Region Show/Hide

Posted 04 Aug 2004 17:46:13
1
has voted
04 Aug 2004 17:46:13 Mark Gwaltney posted:
Is there a may to create a conditional region that will instantly show/hide a region on a page without reloading the page?

For example, click an image or check a box and a conditional region appears.

Thx,
Mark<u></u><b></b>

Replies

Replied 04 Aug 2004 18:43:12
04 Aug 2004 18:43:12 Lee Diggins replied:
Hi Mark

I think you're looking for collapsible outlines, which is a javascript thing. I know extensions exist for DW, do a search here on DMXZone, Macromedia and Google.

Digga

Sharing Knowledge Saves Valuable Time!!!
Replied 05 Aug 2004 01:58:20
05 Aug 2004 01:58:20 Dave Thomas replied:
i have some code to collapse/expand divs using a text link, you may be able to modify it to work with your image or whatever.

let me know if you want it.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
Replied 05 Aug 2004 02:20:21
05 Aug 2004 02:20:21 Mark Gwaltney replied:
Dave,

That sounds great. Please post or email me.

Thx,
Mark
Replied 05 Aug 2004 12:32:38
05 Aug 2004 12:32:38 Dave Thomas replied:
part 1 goes in the HEAD of the doc

<pre id=code><font face=courier size=2 id=code>
&lt;script language="JavaScript"&gt;
&lt;!--
function expand(param)
{
param.style.display=(param.style.display=="none"?"":"none";
}
//--&gt;
&lt;/script&gt;
</font id=code></pre id=code>

part 2 the DIV itself., you can use loads of divs, just make sure they each have different ID's

example:
<pre id=code><font face=courier size=2 id=code>
&lt;a href="javascript:expand(document.getElementById('mission'))"&gt;&lt;b&gt;Mission Statment&lt;/b&gt;&lt;/a&gt;
&lt;div id="mission" width="300px" style="display:none"&gt;
your stuff goes here............
&lt;/div&gt;
</font id=code></pre id=code>

for a working example of what it does, look here www.flexicomms.com/about.html, and use the 4 links on the main page.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
Replied 17 Mar 2007 00:44:39
17 Mar 2007 00:44:39 Jonathan Barbeau replied:
Let me just say you have made me a happy man today. Thanks a bunch!

Reply to this topic