PDA

View Full Version : FoldoutMenu3 expanded on certain pages


pulga
23.05.2001, 13:48
Muy buenos dias a todos,
Hope this finds everyone well. I'm posting this hoping that DCage will save my ass again.

About 2 months ago our genius in Japan altered the FoldOutMenu3 script for me so that certain menu sections would load expanded from certain pages. For example, if a link in a menu subsection was clicked, upon load, that section of the menu would load expanded.

His addition looked like this:

addr=location.href.substr(location.href.lastIndexO f('/') + 1,location.href.length);
menuNum= [
['corporate_profile.asp'],[0],
['corporate_management.asp'],[0],
['corporate_venture.asp'],[0],
['corporate_partners.asp'],[0],
['corporate_events.asp'],[0],
['corporate_press.asp'],[0],
['corporate_news.asp'],[0],
['corporate_presskit.asp'],[0],
['corporate_investors.asp'],[0],
['technology_iSyntax.asp'],[1],
['technology_whitepapers.asp'],[1],
['technology_login.asp'],[1],
['products_iSite.asp'],[2],
['products_new.asp'],[2],
['products_login.asp'],[2]
]
var pulgaSezOpen=[];
for(i=0;i<menuNum.length;i+=2){
if(menuNum[i:ba790sobrb]==addr) {pulgaSezOpen= menuNum [i+1];break}
}

With PulgaSezOpen being defined as


}

function askPulga(){
var a= arguments
if(a.length<pulgaSezOpen.length)return;
for(var i=0;i<a.length;i++){
if(a[i:ba790sobrb]!=pulgaSezOpen[i:ba790sobrb]) return 0;
}
return 1;
}

Anyhow, I haven't seen DCage in a while so I'm hoping that someone there, maybe even Bratta himself, can lend me a hand.

Many thanks in advance. Best, Pulga

************************
Maferefun Chango baba mi ati gbobo Oricha!!
Kabiesile Kawo E!
Titi Lae Oba Koso!
Titi Lae Oba Oyo!
Moyuba o Chango!!
************************

pulga
24.05.2001, 12:41
There's just got to be a way...


************************
Maferefun Chango baba mi ati gbobo Oricha!!
Kabiesile Kawo E!
Titi Lae Oba Koso!
Titi Lae Oba Oyo!
Moyuba o Chango!!
************************

skiingyac
25.05.2001, 12:24
This might not be the most graceful way, but you can unfold the menus yourself by calling the .fold(), .foldsub1(), etc. functions. Example: http://skiingyac.dhs.org/projects/foldout3/labinfo.html
I think this is what you're trying to do, but I don't know if this way works for you.

pulga
25.05.2001, 12:42
Hey Skiing Yac! Thanks for the reply. Yeah, that's what I need it to do but, unfortunately, I can't use what you've written. I load the menu onto each page using the <--#INCLUDE FILE--> Tag. This way I can edit the menu in once place instead of on every page in our site. Best, Pulga

************************
Maferefun Chango baba mi ati gbobo Oricha!!
Kabiesile Kawo E!
Titi Lae Oba Koso!
Titi Lae Oba Oyo!
Moyuba o Chango!!
************************

skiingyac
25.05.2001, 14:14
Can you assign a code to all of the pages on your site that has the index in the sub-menus in it, then run a function either server-side or using js to read the code and then unfold the proper menus? Like a page with a code of "0,1,3" would get passed to the function you make, which would then do .fold(0) .foldsub1(0,1) and .foldsub2(0,1,3) ? Thats basically the same, except you just need to set the 'code' then. I'm not sure how little work you want to do to get it open on each page... you're going to have to give each page some sort of ID or say which menus to open on each page. is that what you mean?

pulga
25.05.2001, 14:18
Skiing Yac,

I think that's what DCage's old code did:

addr=location.href.substr(location.href.lastIndexO f('/') + 1,location.href.length);
menuNum= [
['corporate_profile.asp'],[0],
['corporate_management.asp'],[0],
['corporate_venture.asp'],[0],
['corporate_partners.asp'],[0],
['corporate_events.asp'],[0],
['corporate_press.asp'],[0],
['corporate_news.asp'],[0],
['corporate_presskit.asp'],[0],
['corporate_investors.asp'],[0],
['technology_iSyntax.asp'],[1],
['technology_whitepapers.asp'],[1],
['technology_login.asp'],[1],
['products_iSite.asp'],[2],
['products_new.asp'],[2],
['products_login.asp'],[2]
]


But it's not compatible with Netscape!

Ay, there's the rub!

Pulga

************************
Maferefun Chango baba mi ati gbobo Oricha!!
Kabiesile Kawo E!
Titi Lae Oba Koso!
Titi Lae Oba Oyo!
Moyuba o Chango!!
************************

pulga
30.05.2001, 12:55
Got to start this up again. See if anyone takes the challenge. I think that DCage might be the only one who can do it, if it can be done in NS and IE. Best, Pulga

************************
Maferefun Chango baba mi ati gbobo Oricha!!
Kabiesile Kawo E!
Titi Lae Oba Koso!
Titi Lae Oba Oyo!
Moyuba o Chango!!
************************