PDA

View Full Version : Contractible Headers Script - expand/contracts out of control :(



kriskl
07-08-2006, 10:38 AM
1) Script Title: Contractible Headers Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate2.htm

3) Describe problem: Hi!

I tried this script to use as a menu, and everything seemed fine at first,
however when i click on sub menu links, it it expands or contracts other "expandcontents"
I think i worked out it is something to do with var enablepersist="on"and cookies..

here's the link to a draft website
http://kriskl.gotdns.com/

any help would be greatly appreciated, as i like that script and don't want to give up on it yet!

thaks

kris

jr_yeo
07-08-2006, 11:16 AM
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)

basically, if u don't want to collapse ACCA after clicking on Courses then collapseprevious should be no :p


u see what i mean? :D

kriskl
07-08-2006, 01:15 PM
hi Jr!

thank you for reply, i know that i can do it, but that;s not what was my problem :(

My problem is when I click sublinks,

The way main link buttons works is fine,
I wanted to have one expandable menu (sublinks) opened at a time, but clicking on sublinks, makes other MainLiks - Headers open as well almost in random

jr_yeo
07-08-2006, 02:09 PM
m sorry :o i still don't see the problem :)

<edit>

have u tried the collapseprevious=no and click the sublinks? :p

kriskl
07-08-2006, 03:01 PM
hi!
of course i tried it on/off etc, I can only guess you are using Internet Explorer, so it not so chaotic like in Firefox,
but it stil is not behaving like it should to my mind,

maybe someone else understand what i mean and can see and explain it a better?

Twey
07-08-2006, 03:18 PM
Your IDs don't match up. For example, you have:
<h3 onclick="expandcontent('sc1')" style="cursor:hand; cursor: pointer">
<a href="index.php" class="mlink">Home</a>
</h3>But you don't have a
<div id="sc1" class="switchcontent"> anywhere.

jr_yeo
07-08-2006, 03:38 PM
he he :o

<edit>

I can only guess you are using Internet Explorer, so it not so chaotic like in Firefox

tried ur site in IE ... it's as chaotic in IE as FX ...
thought i myt want to know :p

kriskl
07-08-2006, 04:32 PM
hi Twey!

I corrected it, (i thought it was not necessary, since it was empty)

but it still didnt solve the problem.

maybe Contr, Headers script was not made to contain sub links menus :(

jr_yeo
07-08-2006, 05:04 PM
can it not be done by frames and iframes? :)

kriskl
07-09-2006, 09:58 AM
frames? i don;t know,

I wanted pure css menu, that would degrade nicely when not supported by browsers or lack of javascript.

jr_yeo
07-09-2006, 10:00 AM
hey, its just a suggestion :cool: