Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:39
2 different Menus on page.
Poster: Dubie
Dated: Friday March 5 2004 - 4:00:35 GMT
Hello all,
I seen the readme about adding 2 menus on a page.
I've tried a couple things and they are still running into each other on the page.
I have one that goes across the page on the top.
I am trying to add the menu "on right click".
I went ahead and put all the files I would need to for it in its own folder.
The other menu is also in its own folder.
When I add the new menu to the site code it seems to pick up the other one and not the new one.
With the right click it just does not do anything.
With the Top menu it picks up the right clicks code some how.
If I mouse over the top one it bring up the right click menus and colors.
Here is how I call the first one.
Response.Write "<script language=""JavaScript"" type=""text/javascript"">browserChk();</script>" & vbNewline
if intShowJavaMenu = "1" then
if mlev = 0 then
strJavaMenuTop = strJavaMenuLogout
else
strJavaMenuTop = strJavaMenuLogin
end if
Response.Write "<script type=""text/javascript"" language=""javascript"" src=""java_menu/milonic_src.js""></script>" & vbNewLine
%>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenudom.js><\/scr"+"ipt>");
</script>
<!--#include file="inc_javamenu_skin.asp"-->
<%
end if
Here is what I added to make the 2nd one.
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="contextmenu.js" type=text/javascript></SCRIPT>
I also tried to rename them all and that didn't work.
Question: How do I add them 2 menus to the same page and have them their own menus not related at all?
I also did a search but found nothing to help out.
Any help would be appreciated.
Thanks for your time,
Dubie
Poster: Maz
Dated: Friday March 5 2004 - 4:29:51 GMT
You are duplicating everything, that's incorrect.
The only thing you need to duplicate are the menustyles and menuitems on menu-data.js and rename them.
start with one menu and its submenus.
Then try duplicating the main menu items and change the name so instead of calling 'mainmenu' its calling 'secondmenu' or whatever you want to call it. If you are using the same style for the main menu you can keep the main menu style name. Otherwise duplicate the style and give that a new name too and then link it to style=
Same thing with submenus.
You can separate items into as many menus as you want each with its own name and relavent style name.
connect the submenu names with showmenu= in the items.
The ones you want to show on the page, place alwaysvisible=1; just above the menu items.
Place the original scripts under the body tag, starting with milonic_src.js and ending with what ever name you give to menu_data.js
All the menus you created are in menu_data.js and call the set of 3 js files.
Start with a clean set and slowly, duplicating avoids errors, and keep checking in your browser, if you mess up the menus won't show.
maz
hmmm
Poster: Dubie
Dated: Friday March 5 2004 - 6:56:07 GMT
Sup,
They are all named different and in one file "menu_data.js"
Here is the code from that file:
Code:
<SCRIPT language="JavaScript">
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(header_menu_style=new mm_style()){
onbgcolor="";
oncolor="#76ADEA";
offbgcolor="";
offcolor="#FFFFFF";
bordercolor="#FFFFFF";
borderstyle="raised";
borderwidth="0";
padding="4";
fontsize="11";
fontfamily="arial,verdana";
fontweight= "bold";
high3dcolor="";
low3dcolor="";
separatorcolor="transparent";
separatorsize="10";
}
with(windows98style=new mm_style()){
onbgcolor="#373F58";
oncolor="#76ADEA";
offbgcolor="#3C4662";
offcolor="#C7DCFF";
bordercolor="";
borderstyle="raised";
borderwidth="0";
separatorsize="2";
padding="3";
fontsize="11";
fontfamily="comic sans ms,arial";
high3dcolor="1px solid #515E83";
low3dcolor="1px solid #1e2024";
image="<%=strImageURL%>xpblank.gif";
subimage="<%=strImageURL%>off_13x13_greyboxed.gif";
onsubimage="<%=strImageURL%>on_13x13_greyboxed.gif";
onborder="1px solid #76ADEA";
}
<!--------Added This Style------------------>
with(contextStyle=new mm_style)
{
onbgcolor="#222222";
oncolor="#555555";
offbgcolor="#555555";
offcolor="#FFFFFF";
bordercolor="#999999";
borderstyle="solid";
borderwidth=1
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=3)"
pagecolor="";
pagebgcolor="#555555";
pageborder="1px solid #ffffff";
pageimage="db_red.gif";
onborder="1px solid #316AC5";
separatorcolor="#999999";
outfilter="randomdissolve(duration=0.4)"
fontsize="75%";
fontstyle="normal";
fontfamily="arial, verdana, tahoma";
separatorsize=0;
padding=3
headerbgcolor="#888888";
headercolor="#ffffff";
headerborder="1px solid #000000";
fontsize="10px";
subimage="black_13x13_greyboxed.gif";
if(!mac)onborder="1px solid #000000";
}
<!--------END Added Style------------------>
<!--------Added These Menu for on right click------------------>
with(milonic=new menuname("contextMenu")){
top="offset=2"
style = contextStyle;
margin=3
aI("text=CS-HQ Necropolis;url=http://www.dubie.net;image=home.gif");
aI("text=Whos Online;url=all3sspys.asp;");
aI("text=HLStats;showmenu=HLStats;");
aI("text=PsychoStats;showmenu=PsychoStats;");
aI("text=Player Options;showmenu=PlayerOps;");
aI("text=Browser Options;showmenu=BOptions;");
}
with(milonic=new menuname("PsychoStats")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=PsychoStats;type=header;align=center");
aI("text=CS-HQ Necropolis;url=csstats.asp;");
aI("text=CS-HQ Necropolis 2;url=server2ps.asp;");
aI("text=CS-HQ Necropolis 3;url=server3ps.asp;");
}
with(milonic=new menuname("HLStats")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=HLStats-Workin On;type=header;align=center");
}
with(milonic=new menuname("PlayerOps")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=Player Options-Working on;type=header;align=center");
}
with(milonic=new menuname("BOptions")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=Options;type=header;align=center");
aI("text=Back;url=javascript:history.go(-1);image=back.gif");
aI("text=Forward;url=javascript:history.go(1);image=forward.gif");
aI("text=Refresh;url=javascript:history.go(0);image=browser.gif");
aI("text=Print;url=javascript:window.print();separatorsize=1;image=print.gif");
}
<!--------END Added These Menu for on right click------------------>
<!--------Old Menu That is on Top--------->
with(milonic=new menuname("Main Menu")){
style=header_menu_style;
top="<% =strJavaMenuTop %>";
left=41;
alwaysvisible=1;
orientation="horizontal";
aI("image=<%=strImageURL%>icon_nav_home.gif;text=<%=fLang(strLangInc_Header00240)%>;url=<%=strHomeURL%>;status=<%=fLang(strLangInc_Header00240)%>;showmenu=Home;");
aI("image=<%=strImageURL%>icon_folder_open_topic.gif;text=<%=fLang(strLangForums00010)%>;url=default.asp?sectionid=0;status=<%=fLang(strLangForums00010)%>;showmenu=Forums;");
aI("image=<%=strImageURL%>icon_nav_url.gif;text=<%=fLang(strLangInc_Header00620)%>;url=portal_resources.asp?sectionid=5&area=4;status=<%=fLang(strLangInc_Header00620)%>;showmenu=Resources;");
if ('<%= mLev %>' != "0")
{
aI("image=<%=strImageURL%>icon_member.gif;text=<%=fLang(strLangInc_Mainmenu00440)%>;url=my.asp?sectionid=2;status=<%=fLang(strLangInc_Mainmenu00440)%>;showmenu=Personal;");
}
if ('<%= intGuestbook %>' == "1")
{
aI("image=<%=strImageURL%>icon_nav_guestbook.gif;text=<%=fLang(strLangGuest_Book00010)%>;url=guestbook.asp?sectionid=7;status=<%=fLang(strLangGuest_Book00010)%>;showmenu=GuestBook;");
}
aI("image=<%=strImageURL%>icon_smile_evil.gif;text=<%=fLang(strLangThe_Rabble00010)%>;url=about.asp?sectionid=2;status=<%=fLang(strLangThe_Rabble00010)%>;");
aI("image=<%=strImageURL%>icon_nav_help.gif;text=<%=fLang(strLangInc_Header00400)%>;url=faq.asp?sectionid=3;status=<%=fLang(strLangInc_Header00400)%>;showmenu=FAQ;");
if ('<%= mlev %>' == "4")
{
aI("text=Admin;url=admin_home.asp?sectionid=888;showmenu=AdminHome;");
aI("text=Mod Config;url=admin_home.asp?sectionid=999;showmenu=ModConfig;");
}
if ('<%= mlev %>' == "3")
{
aI("text=Moderator Home;url=moderator_home.asp?sectionid=888;");
}
}
with(milonic=new menuname("Home")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangSite_Portal00010)%>;url=portal_content.asp?sectionid=6;status=<%=fLang(strLangSite_Portal00010)%>;image=<%=strImageURL%>xphome.gif;");
aI("text=<%=fLang(strLangJava_Menu00010)%>;url=javascript:window.external.AddFavorite('<%=strHomeURL%>', '<%=strForumTitle%>');status=<%=fLang(strLangJava_Menu00010)%>;");
if ('<%= intDonation %>' == "1")
{
aI("text=<%=fLang(strLangDonation00060)%>;url=donate_infos.asp?sectionid=0;status=<%=fLang(strLangDonation00060)%>;image=<%=strImageURL%>dollar.gif;");
}
}
with(milonic=new menuname("Forums")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangForum00980)%>;url=default_category.asp?sectionid=0;status=<%=fLang(strLangForum00980)%>;");
aI("text=<%=fLang(strLangTopics00010)%>;showmenu=Topics;status=<%=fLang(strLangTopics00010)%>;");
if ('<%= strPolls %>' == "1")
{
aI("text=<%=fLang(strLangActive_Polls00010)%>;url=active_polls.asp?sectionid=0;status=<%=fLang(strLangActive_Polls00010)%>;");
}
if ('<%= intShowEvents %>' == "1")
{
aI("text=<%=fLang(strLangEvents_Calendar00010)%>;showmenu=Events;status=<%=fLang(strLangEvents_Calendar00010)%>;");
}
aI("text=<%=fLang(strLangSearch00540)%>;showmenu=Search;status=<%=fLang(strLangSearch00540)%>;image=<%=strImageURL%>xppreview.gif;");
if ('<%= intStatistics %>' == "1")
{
aI("text=<%=fLang(strLangStatistics00010)%>;showmenu=Statistics;status=<%=fLang(strLangStatistics00010)%>;");
}
aI("text=<%=fLang(strLangMembers200010)%>;showmenu=Members;status=<%=fLang(strLangMembers200010)%>;");
}
with(milonic=new menuname("Resources")){
style=windows98style;
overflow="scroll";
margin="5";
if ('<%= intTopsite %>' == "1")
{
aI("text=<%=fLang(strLangTopSite00550)%>;url=topsite.asp?sectionid=5;status=<%=fLang(strLangTopSite00550)%>;");
}
aI("text=<%=fLang(strLangInc_Mainmenu00390)%>;url=whatsnew.asp?sectionid=5&area=4;status=<%=fLang(strLangInc_Mainmenu00390)%>;");
if ('<%= intPortalLinks %>' == "1")
{
aI("text=<%=fLang(strLangLinks01130)%>;url=portal_links.asp?sectionid=5&area=4;status=<%=fLang(strLangLinks01130)%>;");
}
if ('<%= intPortalnews %>' == "1")
{
aI("text=<%=fLang(strLangLinks01140)%>;url=portal_news.asp?sectionid=0;status=<%=fLang(strLangLinks01140)%>;");
}
aI("text=<%=fLang(strLangLinks01250)%>;url=portal_articles.asp?sectionid=5&area=3;status=<%=fLang(strLangLinks01250)%>;");
aI("text=<%=fLang(strLangGoogle00010)%>;url=myowngoogle.asp?sectionid=4;status=<%=fLang(strLangGoogle00010)%>;image=<%=strImageURL%>xppreview.gif;");
if ('<%= intPortalPhotoAlbum %>' == "1")
{
aI("text=<%=fLang(strLangPhoto_Album00010)%>;url=photo_album.asp?sectionid=5;status=<%=fLang(strLangPhoto_Album00010)%>;");
}
if ('<%= intPortalFileLister %>' == "1")
{
aI("text=<%=fLang(strLangFile_Lister00010)%>;url=file_lister.asp?sectionid=5;status=<%=fLang(strLangFile_Lister00010)%>;");
}
if ('<%= intUseFileLibrary %>' == "1")
{
aI("text=<%=fLang(strLangLinks01160)%>;url=file_library.asp?sectionid=5&area=4;status=<%=fLang(strLangLinks01160)%>;image=<%=strImageURL%>download.gif;");
}
if ('<%= intClassifieds %>' == "1")
{
aI("text=<%=fLang(strLangClassifieds00040)%>;url=Classifieds.asp?sectionid=7&area=3;status=<%=fLang(strLangClassifieds00040)%>;");
}
}
with(milonic=new menuname("Personal")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangMy00250)%>;showmenu=MyArea;status=<%=fLang(strLangMy00250)%>;");
aI("text=<%=fLang(strLangJava_Menu00080)%>;url=javascript:openWindowGal('pop_photo_gallery.asp?MEMBER_ID=<%= MemberID %>&M_NAME=<%= strDBNTUserName %>');status=<%=fLang(strLangJava_Menu00080)%>;");
aI("text=<%=fLang(strLangInc_Header00260)%>;url=pop_profile.asp?mode=Edit§ionid=2;status=<%=fLang(strLangInc_Header00260)%>;");
if ('<%= intBookMark %>' == "1")
{
aI("text=<%=fLang(strLangInc_Header00760)%>;url=bookmark.asp?sectionid=2;status=<%=fLang(strLangInc_Header00760)%>;");
}
aI("text=<%=fLang(strLangPop_Help00180)%>;url=subscription_list.asp?sectionid=2;status=<%=fLang(strLangPop_Help00180)%>;");
aI("text=<%=fLang(strLangJava_Menu00130)%>;url=Favourites_Home.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00130)%>;");
}
with(milonic=new menuname("GuestBook")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangJava_Menu00090)%>;url=guestbook.asp?action=view§ionid=7;status=<%=fLang(strLangJava_Menu00090)%>;");
aI("text=<%=fLang(strLangJava_Menu00100)%>;url=guestbook.asp?action=sign§ionid=7;status=<%=fLang(strLangJava_Menu00100)%>;");
}
with(milonic=new menuname("FAQ")){
style=windows98style;
overflow="scroll";
margin="5";
if ('<%= mlev %>' == "4")
{
aI("text=<%=fLang(strLangJava_Menu00140)%>;url=faq_4admins.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00150)%>;image=<%=strImageURL%>xpquestion.gif;");
aI("text=<%=fLang(strLangJava_Menu00160)%>;url=faq_4moder.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00170)%>;image=<%=strImageURL%>xpquestion.gif;");
}
if ('<%= mlev %>' == "3")
{
aI("text=<%=fLang(strLangJava_Menu00160)%>;url=faq_4moder.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00170)%>;image=<%=strImageURL%>xpquestion.gif;");
}
aI("text=<%=fLang(strLangJava_Menu00110)%>;url=policy.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00110)%>;image=<%=strImageURL%>xpquestion.gif;");
aI("text=<%=fLang(strLangInc_Mainmenu00350)%>;url=rules.asp?sectionid=2;status=<%=fLang(strLangInc_Mainmenu00350)%>;image=<%=strImageURL%>xpquestion.gif;");
}
with(milonic=new menuname("AdminHome")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=Reset Variables;url=javascript:openWindow3('admin_run_config.asp');");
aI("text=Subscriptions;url=subscription_list.asp?sectionid=2&MODE=all;");
aI("text=Upload Files;url=javascript:openWindow3('pop_upload.asp?referrer=admin_upload');");
aI("text=Pending Members;url=admin_accounts_pending.asp?sectionid=888;");
aI("text=Mailing Lists;url=admin_emaillist.asp?sectionid=888;");
aI("text=Ban IP's;url=admin_config_banIP.asp?sectionid=888;");
}
with(milonic=new menuname("ModConfig")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=General Options;showmenu=GeneralOptions;");
aI("text=Member Options;showmenu=MemberOptions;");
aI("text=Poll Admin;url=admin_poll.asp?sectionid=999;");
aI("text=Review Links;url=showbadlinks.asp?sectionid=5;");
}
with(milonic=new menuname("Topics")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangInc_Header00300)%>;url=active.asp?sectionid=0;status=<%=fLang(strLangInc_Header00300)%>;");
if ('<%= intMostRecent %>' == "1")
{
aI("text=<%=fLang(strLangPop_Profile00300)%>;url=inc_mod_recent.asp?sectionid=0;status=<%=fLang(strLangPop_Profile00300)%>;");
}
}
with(milonic=new menuname("Events")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangCla00030)%>;url=cal.asp?sectionid=1;status=<%=fLang(strLangCla00030)%>;");
aI("text=<%=fLang(strLangCla00040)%>;url=cal.asp?sectionid=1&view=weekly;status=<%=fLang(strLangCla00040)%>;");
aI("text=<%=fLang(strLangCla00050)%>;url=cal.asp?sectionid=1&view=monthly;status=<%=fLang(strLangCla00050)%>;");
aI("text=<%=fLang(strLangCla00060)%>;url=cal.asp?sectionid=1&view=yearly;status=<%=fLang(strLangCla00060)%>;");
aI("text=<%=fLang(strLangCla00070)%>;url=cal.asp?sectionid=1&view=eventslist;status=<%=fLang(strLangCla00070)%>;");
}
with(milonic=new menuname("Search")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangMembers00120)%>;url=search.asp?sectionid=4;status=<%=fLang(strLangMembers00120)%>;");
aI("text=<%=fLang(strLangSearch_Advanced00940)%>;url=search_advanced.asp?sectionid=4;status=<%=fLang(strLangSearch_Advanced00940)%>;");
aI("text=<%=fLang(strLangInc_Mainmenu00430)%>;url=membersearch.asp?sectionid=4;status=<%=fLang(strLangInc_Mainmenu00430)%>;");
if ('<%= intPortalPhotoAlbum %>' == "1")
{
aI("text=<%=fLang(strLangJava_Menu00020)%>;url=photo_album.asp?sectionid=4;status=<%=fLang(strLangJava_Menu00020)%>;");
}
if ('<%= intPortalFileLister %>' == "1")
{
aI("text=<%=fLang(strLangJava_Menu00030)%>;url=file_lister.asp?sectionid=4;status=<%=fLang(strLangJava_Menu00030)%>;");
}
}
with(milonic=new menuname("Statistics")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangJava_Menu00040)%>;url=forum_stats.asp?sectionid=0;status=<%=fLang(strLangJava_Menu00040)%>;");
aI("text=<%=fLang(strLangJava_Menu00050)%>;url=forum_stats2.asp?sectionid=0;status=<%=fLang(strLangJava_Menu00050)%>;");
aI("text=<%=fLang(strLangJava_Menu00060)%>;url=topic_stats.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00060)%>;");
}
with(milonic=new menuname("Members")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangSearch00530)%>;url=members.asp?sectionid=4;status=<%=fLang(strLangSearch00530)%>;");
aI("text=<%=fLang(strLangInc_Activeusers00050)%>;url=active_users.asp?sectionid=2;status=<%=fLang(strLangInc_Activeusers00050)%>;");
aI("text=<%=fLang(strLangJava_Menu00070)%>;url=newmembers.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00070)%>;");
}
with(milonic=new menuname("MyArea")){
style=windows98style;
margin="5";
if ('<%= intBuddyList %>' == "1")
{
aI("text=<%=fLang(strLangPop_buddy00130)%>;url=buddy.asp?sectionid=2;status=<%=fLang(strLangPop_buddy00130)%>;");
}
aI("text=<%=fLang(strLangInc_Header00840)%>;url=my.asp?sectionid=2;status=<%=fLang(strLangInc_Header00840)%>;");
if ('<%= strMyOptions %>' == "1")
{
aI("text=<%=fLang(strLangMy00300)%>;url=my_edit_config.asp?sectionid=2;status=<%=fLang(strLangMy00300)%>;");
}
aI("text=<%=fLang(strLangJava_Menu00120)%>;url=my_topics.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00120)%>;");
aI("text=<%= fLangN(strLangMy_Posts00010, strDBNTUserName) %>;url=active_my_posts.asp?sectionid=2;status=<%= fLangN(strLangMy_Posts00010, strDBNTUserName) %>...;");
}
with(milonic=new menuname("GeneralOptions")){
style=windows98style;
margin="5";
aI("text=Portal Config;url=admin_portal.asp?sectionid=999;");
aI("text=Image's Mods;url=admin_menus.asp?sectionid=999;");
aI("text=Attachments;url=admin_fileattachment.asp?sectionid=999;");
aI("text=Slash Admin;url=slash_admin.asp?sectionid=999;");
}
with(milonic=new menuname("MemberOptions")){
style=windows98style;
margin="5";
aI("text=Avatars;url=admin_avatar_home.asp?sectionid=999;");
aI("text=Member Fields;url=admin_user_fields.asp?sectionid=999;");
aI("text=PM Maint.;url=admin_pmmaint.asp?sectionid=999;");
aI("text=Remove Topics;url=admin_delete_topics.asp?sectionid=999;");
};
drawMenus();
<!--------END Old Menu thats on top--------->
</SCRIPT>
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(header_menu_style=new mm_style()){
onbgcolor="";
oncolor="#76ADEA";
offbgcolor="";
offcolor="#FFFFFF";
bordercolor="#FFFFFF";
borderstyle="raised";
borderwidth="0";
padding="4";
fontsize="11";
fontfamily="arial,verdana";
fontweight= "bold";
high3dcolor="";
low3dcolor="";
separatorcolor="transparent";
separatorsize="10";
}
with(windows98style=new mm_style()){
onbgcolor="#373F58";
oncolor="#76ADEA";
offbgcolor="#3C4662";
offcolor="#C7DCFF";
bordercolor="";
borderstyle="raised";
borderwidth="0";
separatorsize="2";
padding="3";
fontsize="11";
fontfamily="comic sans ms,arial";
high3dcolor="1px solid #515E83";
low3dcolor="1px solid #1e2024";
image="<%=strImageURL%>xpblank.gif";
subimage="<%=strImageURL%>off_13x13_greyboxed.gif";
onsubimage="<%=strImageURL%>on_13x13_greyboxed.gif";
onborder="1px solid #76ADEA";
}
<!--------Added This Style------------------>
with(contextStyle=new mm_style)
{
onbgcolor="#222222";
oncolor="#555555";
offbgcolor="#555555";
offcolor="#FFFFFF";
bordercolor="#999999";
borderstyle="solid";
borderwidth=1
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=3)"
pagecolor="";
pagebgcolor="#555555";
pageborder="1px solid #ffffff";
pageimage="db_red.gif";
onborder="1px solid #316AC5";
separatorcolor="#999999";
outfilter="randomdissolve(duration=0.4)"
fontsize="75%";
fontstyle="normal";
fontfamily="arial, verdana, tahoma";
separatorsize=0;
padding=3
headerbgcolor="#888888";
headercolor="#ffffff";
headerborder="1px solid #000000";
fontsize="10px";
subimage="black_13x13_greyboxed.gif";
if(!mac)onborder="1px solid #000000";
}
<!--------END Added Style------------------>
<!--------Added These Menu for on right click------------------>
with(milonic=new menuname("contextMenu")){
top="offset=2"
style = contextStyle;
margin=3
aI("text=CS-HQ Necropolis;url=http://www.dubie.net;image=home.gif");
aI("text=Whos Online;url=all3sspys.asp;");
aI("text=HLStats;showmenu=HLStats;");
aI("text=PsychoStats;showmenu=PsychoStats;");
aI("text=Player Options;showmenu=PlayerOps;");
aI("text=Browser Options;showmenu=BOptions;");
}
with(milonic=new menuname("PsychoStats")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=PsychoStats;type=header;align=center");
aI("text=CS-HQ Necropolis;url=csstats.asp;");
aI("text=CS-HQ Necropolis 2;url=server2ps.asp;");
aI("text=CS-HQ Necropolis 3;url=server3ps.asp;");
}
with(milonic=new menuname("HLStats")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=HLStats-Workin On;type=header;align=center");
}
with(milonic=new menuname("PlayerOps")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=Player Options-Working on;type=header;align=center");
}
with(milonic=new menuname("BOptions")){
style = contextStyle;
margin=3
overflow="scroll";
itemwidth=150;
aI("text=Options;type=header;align=center");
aI("text=Back;url=javascript:history.go(-1);image=back.gif");
aI("text=Forward;url=javascript:history.go(1);image=forward.gif");
aI("text=Refresh;url=javascript:history.go(0);image=browser.gif");
aI("text=Print;url=javascript:window.print();separatorsize=1;image=print.gif");
}
<!--------END Added These Menu for on right click------------------>
<!--------Old Menu That is on Top--------->
with(milonic=new menuname("Main Menu")){
style=header_menu_style;
top="<% =strJavaMenuTop %>";
left=41;
alwaysvisible=1;
orientation="horizontal";
aI("image=<%=strImageURL%>icon_nav_home.gif;text=<%=fLang(strLangInc_Header00240)%>;url=<%=strHomeURL%>;status=<%=fLang(strLangInc_Header00240)%>;showmenu=Home;");
aI("image=<%=strImageURL%>icon_folder_open_topic.gif;text=<%=fLang(strLangForums00010)%>;url=default.asp?sectionid=0;status=<%=fLang(strLangForums00010)%>;showmenu=Forums;");
aI("image=<%=strImageURL%>icon_nav_url.gif;text=<%=fLang(strLangInc_Header00620)%>;url=portal_resources.asp?sectionid=5&area=4;status=<%=fLang(strLangInc_Header00620)%>;showmenu=Resources;");
if ('<%= mLev %>' != "0")
{
aI("image=<%=strImageURL%>icon_member.gif;text=<%=fLang(strLangInc_Mainmenu00440)%>;url=my.asp?sectionid=2;status=<%=fLang(strLangInc_Mainmenu00440)%>;showmenu=Personal;");
}
if ('<%= intGuestbook %>' == "1")
{
aI("image=<%=strImageURL%>icon_nav_guestbook.gif;text=<%=fLang(strLangGuest_Book00010)%>;url=guestbook.asp?sectionid=7;status=<%=fLang(strLangGuest_Book00010)%>;showmenu=GuestBook;");
}
aI("image=<%=strImageURL%>icon_smile_evil.gif;text=<%=fLang(strLangThe_Rabble00010)%>;url=about.asp?sectionid=2;status=<%=fLang(strLangThe_Rabble00010)%>;");
aI("image=<%=strImageURL%>icon_nav_help.gif;text=<%=fLang(strLangInc_Header00400)%>;url=faq.asp?sectionid=3;status=<%=fLang(strLangInc_Header00400)%>;showmenu=FAQ;");
if ('<%= mlev %>' == "4")
{
aI("text=Admin;url=admin_home.asp?sectionid=888;showmenu=AdminHome;");
aI("text=Mod Config;url=admin_home.asp?sectionid=999;showmenu=ModConfig;");
}
if ('<%= mlev %>' == "3")
{
aI("text=Moderator Home;url=moderator_home.asp?sectionid=888;");
}
}
with(milonic=new menuname("Home")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangSite_Portal00010)%>;url=portal_content.asp?sectionid=6;status=<%=fLang(strLangSite_Portal00010)%>;image=<%=strImageURL%>xphome.gif;");
aI("text=<%=fLang(strLangJava_Menu00010)%>;url=javascript:window.external.AddFavorite('<%=strHomeURL%>', '<%=strForumTitle%>');status=<%=fLang(strLangJava_Menu00010)%>;");
if ('<%= intDonation %>' == "1")
{
aI("text=<%=fLang(strLangDonation00060)%>;url=donate_infos.asp?sectionid=0;status=<%=fLang(strLangDonation00060)%>;image=<%=strImageURL%>dollar.gif;");
}
}
with(milonic=new menuname("Forums")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangForum00980)%>;url=default_category.asp?sectionid=0;status=<%=fLang(strLangForum00980)%>;");
aI("text=<%=fLang(strLangTopics00010)%>;showmenu=Topics;status=<%=fLang(strLangTopics00010)%>;");
if ('<%= strPolls %>' == "1")
{
aI("text=<%=fLang(strLangActive_Polls00010)%>;url=active_polls.asp?sectionid=0;status=<%=fLang(strLangActive_Polls00010)%>;");
}
if ('<%= intShowEvents %>' == "1")
{
aI("text=<%=fLang(strLangEvents_Calendar00010)%>;showmenu=Events;status=<%=fLang(strLangEvents_Calendar00010)%>;");
}
aI("text=<%=fLang(strLangSearch00540)%>;showmenu=Search;status=<%=fLang(strLangSearch00540)%>;image=<%=strImageURL%>xppreview.gif;");
if ('<%= intStatistics %>' == "1")
{
aI("text=<%=fLang(strLangStatistics00010)%>;showmenu=Statistics;status=<%=fLang(strLangStatistics00010)%>;");
}
aI("text=<%=fLang(strLangMembers200010)%>;showmenu=Members;status=<%=fLang(strLangMembers200010)%>;");
}
with(milonic=new menuname("Resources")){
style=windows98style;
overflow="scroll";
margin="5";
if ('<%= intTopsite %>' == "1")
{
aI("text=<%=fLang(strLangTopSite00550)%>;url=topsite.asp?sectionid=5;status=<%=fLang(strLangTopSite00550)%>;");
}
aI("text=<%=fLang(strLangInc_Mainmenu00390)%>;url=whatsnew.asp?sectionid=5&area=4;status=<%=fLang(strLangInc_Mainmenu00390)%>;");
if ('<%= intPortalLinks %>' == "1")
{
aI("text=<%=fLang(strLangLinks01130)%>;url=portal_links.asp?sectionid=5&area=4;status=<%=fLang(strLangLinks01130)%>;");
}
if ('<%= intPortalnews %>' == "1")
{
aI("text=<%=fLang(strLangLinks01140)%>;url=portal_news.asp?sectionid=0;status=<%=fLang(strLangLinks01140)%>;");
}
aI("text=<%=fLang(strLangLinks01250)%>;url=portal_articles.asp?sectionid=5&area=3;status=<%=fLang(strLangLinks01250)%>;");
aI("text=<%=fLang(strLangGoogle00010)%>;url=myowngoogle.asp?sectionid=4;status=<%=fLang(strLangGoogle00010)%>;image=<%=strImageURL%>xppreview.gif;");
if ('<%= intPortalPhotoAlbum %>' == "1")
{
aI("text=<%=fLang(strLangPhoto_Album00010)%>;url=photo_album.asp?sectionid=5;status=<%=fLang(strLangPhoto_Album00010)%>;");
}
if ('<%= intPortalFileLister %>' == "1")
{
aI("text=<%=fLang(strLangFile_Lister00010)%>;url=file_lister.asp?sectionid=5;status=<%=fLang(strLangFile_Lister00010)%>;");
}
if ('<%= intUseFileLibrary %>' == "1")
{
aI("text=<%=fLang(strLangLinks01160)%>;url=file_library.asp?sectionid=5&area=4;status=<%=fLang(strLangLinks01160)%>;image=<%=strImageURL%>download.gif;");
}
if ('<%= intClassifieds %>' == "1")
{
aI("text=<%=fLang(strLangClassifieds00040)%>;url=Classifieds.asp?sectionid=7&area=3;status=<%=fLang(strLangClassifieds00040)%>;");
}
}
with(milonic=new menuname("Personal")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangMy00250)%>;showmenu=MyArea;status=<%=fLang(strLangMy00250)%>;");
aI("text=<%=fLang(strLangJava_Menu00080)%>;url=javascript:openWindowGal('pop_photo_gallery.asp?MEMBER_ID=<%= MemberID %>&M_NAME=<%= strDBNTUserName %>');status=<%=fLang(strLangJava_Menu00080)%>;");
aI("text=<%=fLang(strLangInc_Header00260)%>;url=pop_profile.asp?mode=Edit§ionid=2;status=<%=fLang(strLangInc_Header00260)%>;");
if ('<%= intBookMark %>' == "1")
{
aI("text=<%=fLang(strLangInc_Header00760)%>;url=bookmark.asp?sectionid=2;status=<%=fLang(strLangInc_Header00760)%>;");
}
aI("text=<%=fLang(strLangPop_Help00180)%>;url=subscription_list.asp?sectionid=2;status=<%=fLang(strLangPop_Help00180)%>;");
aI("text=<%=fLang(strLangJava_Menu00130)%>;url=Favourites_Home.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00130)%>;");
}
with(milonic=new menuname("GuestBook")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=<%=fLang(strLangJava_Menu00090)%>;url=guestbook.asp?action=view§ionid=7;status=<%=fLang(strLangJava_Menu00090)%>;");
aI("text=<%=fLang(strLangJava_Menu00100)%>;url=guestbook.asp?action=sign§ionid=7;status=<%=fLang(strLangJava_Menu00100)%>;");
}
with(milonic=new menuname("FAQ")){
style=windows98style;
overflow="scroll";
margin="5";
if ('<%= mlev %>' == "4")
{
aI("text=<%=fLang(strLangJava_Menu00140)%>;url=faq_4admins.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00150)%>;image=<%=strImageURL%>xpquestion.gif;");
aI("text=<%=fLang(strLangJava_Menu00160)%>;url=faq_4moder.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00170)%>;image=<%=strImageURL%>xpquestion.gif;");
}
if ('<%= mlev %>' == "3")
{
aI("text=<%=fLang(strLangJava_Menu00160)%>;url=faq_4moder.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00170)%>;image=<%=strImageURL%>xpquestion.gif;");
}
aI("text=<%=fLang(strLangJava_Menu00110)%>;url=policy.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00110)%>;image=<%=strImageURL%>xpquestion.gif;");
aI("text=<%=fLang(strLangInc_Mainmenu00350)%>;url=rules.asp?sectionid=2;status=<%=fLang(strLangInc_Mainmenu00350)%>;image=<%=strImageURL%>xpquestion.gif;");
}
with(milonic=new menuname("AdminHome")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=Reset Variables;url=javascript:openWindow3('admin_run_config.asp');");
aI("text=Subscriptions;url=subscription_list.asp?sectionid=2&MODE=all;");
aI("text=Upload Files;url=javascript:openWindow3('pop_upload.asp?referrer=admin_upload');");
aI("text=Pending Members;url=admin_accounts_pending.asp?sectionid=888;");
aI("text=Mailing Lists;url=admin_emaillist.asp?sectionid=888;");
aI("text=Ban IP's;url=admin_config_banIP.asp?sectionid=888;");
}
with(milonic=new menuname("ModConfig")){
style=windows98style;
overflow="scroll";
margin="5";
aI("text=General Options;showmenu=GeneralOptions;");
aI("text=Member Options;showmenu=MemberOptions;");
aI("text=Poll Admin;url=admin_poll.asp?sectionid=999;");
aI("text=Review Links;url=showbadlinks.asp?sectionid=5;");
}
with(milonic=new menuname("Topics")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangInc_Header00300)%>;url=active.asp?sectionid=0;status=<%=fLang(strLangInc_Header00300)%>;");
if ('<%= intMostRecent %>' == "1")
{
aI("text=<%=fLang(strLangPop_Profile00300)%>;url=inc_mod_recent.asp?sectionid=0;status=<%=fLang(strLangPop_Profile00300)%>;");
}
}
with(milonic=new menuname("Events")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangCla00030)%>;url=cal.asp?sectionid=1;status=<%=fLang(strLangCla00030)%>;");
aI("text=<%=fLang(strLangCla00040)%>;url=cal.asp?sectionid=1&view=weekly;status=<%=fLang(strLangCla00040)%>;");
aI("text=<%=fLang(strLangCla00050)%>;url=cal.asp?sectionid=1&view=monthly;status=<%=fLang(strLangCla00050)%>;");
aI("text=<%=fLang(strLangCla00060)%>;url=cal.asp?sectionid=1&view=yearly;status=<%=fLang(strLangCla00060)%>;");
aI("text=<%=fLang(strLangCla00070)%>;url=cal.asp?sectionid=1&view=eventslist;status=<%=fLang(strLangCla00070)%>;");
}
with(milonic=new menuname("Search")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangMembers00120)%>;url=search.asp?sectionid=4;status=<%=fLang(strLangMembers00120)%>;");
aI("text=<%=fLang(strLangSearch_Advanced00940)%>;url=search_advanced.asp?sectionid=4;status=<%=fLang(strLangSearch_Advanced00940)%>;");
aI("text=<%=fLang(strLangInc_Mainmenu00430)%>;url=membersearch.asp?sectionid=4;status=<%=fLang(strLangInc_Mainmenu00430)%>;");
if ('<%= intPortalPhotoAlbum %>' == "1")
{
aI("text=<%=fLang(strLangJava_Menu00020)%>;url=photo_album.asp?sectionid=4;status=<%=fLang(strLangJava_Menu00020)%>;");
}
if ('<%= intPortalFileLister %>' == "1")
{
aI("text=<%=fLang(strLangJava_Menu00030)%>;url=file_lister.asp?sectionid=4;status=<%=fLang(strLangJava_Menu00030)%>;");
}
}
with(milonic=new menuname("Statistics")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangJava_Menu00040)%>;url=forum_stats.asp?sectionid=0;status=<%=fLang(strLangJava_Menu00040)%>;");
aI("text=<%=fLang(strLangJava_Menu00050)%>;url=forum_stats2.asp?sectionid=0;status=<%=fLang(strLangJava_Menu00050)%>;");
aI("text=<%=fLang(strLangJava_Menu00060)%>;url=topic_stats.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00060)%>;");
}
with(milonic=new menuname("Members")){
style=windows98style;
margin="5";
aI("text=<%=fLang(strLangSearch00530)%>;url=members.asp?sectionid=4;status=<%=fLang(strLangSearch00530)%>;");
aI("text=<%=fLang(strLangInc_Activeusers00050)%>;url=active_users.asp?sectionid=2;status=<%=fLang(strLangInc_Activeusers00050)%>;");
aI("text=<%=fLang(strLangJava_Menu00070)%>;url=newmembers.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00070)%>;");
}
with(milonic=new menuname("MyArea")){
style=windows98style;
margin="5";
if ('<%= intBuddyList %>' == "1")
{
aI("text=<%=fLang(strLangPop_buddy00130)%>;url=buddy.asp?sectionid=2;status=<%=fLang(strLangPop_buddy00130)%>;");
}
aI("text=<%=fLang(strLangInc_Header00840)%>;url=my.asp?sectionid=2;status=<%=fLang(strLangInc_Header00840)%>;");
if ('<%= strMyOptions %>' == "1")
{
aI("text=<%=fLang(strLangMy00300)%>;url=my_edit_config.asp?sectionid=2;status=<%=fLang(strLangMy00300)%>;");
}
aI("text=<%=fLang(strLangJava_Menu00120)%>;url=my_topics.asp?sectionid=2;status=<%=fLang(strLangJava_Menu00120)%>;");
aI("text=<%= fLangN(strLangMy_Posts00010, strDBNTUserName) %>;url=active_my_posts.asp?sectionid=2;status=<%= fLangN(strLangMy_Posts00010, strDBNTUserName) %>...;");
}
with(milonic=new menuname("GeneralOptions")){
style=windows98style;
margin="5";
aI("text=Portal Config;url=admin_portal.asp?sectionid=999;");
aI("text=Image's Mods;url=admin_menus.asp?sectionid=999;");
aI("text=Attachments;url=admin_fileattachment.asp?sectionid=999;");
aI("text=Slash Admin;url=slash_admin.asp?sectionid=999;");
}
with(milonic=new menuname("MemberOptions")){
style=windows98style;
margin="5";
aI("text=Avatars;url=admin_avatar_home.asp?sectionid=999;");
aI("text=Member Fields;url=admin_user_fields.asp?sectionid=999;");
aI("text=PM Maint.;url=admin_pmmaint.asp?sectionid=999;");
aI("text=Remove Topics;url=admin_delete_topics.asp?sectionid=999;");
};
drawMenus();
<!--------END Old Menu thats on top--------->
</SCRIPT>
I am trying to add the right click, I thought the contextmenu.js was for the right click option. But you said: All the menus you created are in menu_data.js and call the set of 3 js files.
So I assume that they check for that file on a right click?
I committed in where I added things and where the old menus that are working are. So maybe you can see something I missed.
So I would just call the 3 .js file like they are already?
Code:
Response.Write "<script language=""JavaScript"" type=""text/javascript"">browserChk();</script>" & vbNewline
if intShowJavaMenu = "1" then
if mlev = 0 then
strJavaMenuTop = strJavaMenuLogout
else
strJavaMenuTop = strJavaMenuLogin
end if
Response.Write "<script type=""text/javascript"" language=""javascript"" src=""java_menu/milonic_src.js""></script>" & vbNewLine
%>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenudom.js><\/scr"+"ipt>");
</script>
<!--#include file="inc_javamenu_skin.asp"-->
<%
end if
if intShowJavaMenu = "1" then
if mlev = 0 then
strJavaMenuTop = strJavaMenuLogout
else
strJavaMenuTop = strJavaMenuLogin
end if
Response.Write "<script type=""text/javascript"" language=""javascript"" src=""java_menu/milonic_src.js""></script>" & vbNewLine
%>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenudom.js><\/scr"+"ipt>");
</script>
<!--#include file="inc_javamenu_skin.asp"-->
<%
end if
Thanks for your time,
Dubie[/code]
Poster: Maz
Dated: Friday March 5 2004 - 9:30:08 GMT
I'm a bit tired today and I'm lacking back up support
That's a lot of code and changes to the normal way of doing things.
It won't work when there are values missing like this
onbgcolor="";
If you have no value remove them completely, or give it a value you can change later.
Add a / slash before all paths from the root.
I don't know about these... anyone? even if its okay it probably needs a /before
image="<%=strImageURL%>xpblank.gif";
clean up the code eg: ;;;;;;;
margin=3
should be:
margin=3;
aI("text=HLStats-Workin On;type=header;align=center");
aI("text=HLStats-Workin On;type=header;align=center;");
menu{
If{
aI("statements should all end with 2 closing;");
}
}
I can't help you with contextual menu, that part you have to follow the instructions unless someone else can help.
Clean the code up and post a url if you have one.
maz
nada
Poster: Dubie
Dated: Friday March 5 2004 - 17:37:00 GMT
Sup,
I went thro it all and added what you said and it wont work that way.
It works fine with the way it is, http://www.dubie.net
Only thing I am having trouble with is addin another menu with it.
There is no way to just add another menu_data.js like menu2_data.js then just make the calls for it?
I would love to just be able to leave whats working and just add the right click menu to the site. I have yet to find away to do this.
The way the code is called up is in a menu_data.asp so it doesn't even use the code from .js that I see. So I am going to try and just add in another .asp and pull it from there and see what we get.
Any other ideas would be great.
::EDIT::
For each different skin color on the site it has its own menu_data.asp with different Styles.
If that help any
Thanks for your time,
Dubie
half way there
Poster: Dubie
Dated: Friday March 5 2004 - 18:35:41 GMT
Well I went to where it calls the menu_data.asp's and added a new one to it to add menu_data2.asp.
Now when I call the site up, the top menu works great.
When I try to right click on the site it does nothing.
Nothing come up at all not even the defualt IE options, so it its seeing it there but its not calling something it needs to show the menu.
Any idea?
Thanks for your time,
Dubie
Re: nada
Poster: John
Dated: Saturday March 6 2004 - 0:23:55 GMT
Dubie wrote:
I went thro it all and added what you said and it wont work that way.
What won't work what way?
Maz gave you a lot of good info. Your reply tells nothing specific about what won't work.
right click menu
Poster: Dubie
Dated: Saturday March 6 2004 - 0:54:20 GMT
I am trying to get the right click menu to work is all.
I added the double } like he said:
menu{
If{
aI("statements should all end with 2 closing;");
}
}
To all the code above.
I added the ;
on all the
margin=3
should be:
margin=3;
Then the menus just stoped showing up all together.
As is it works fine, with out all the changes.
But I can not get the right click menu to come up when I right click.
I think it knows its there because if I right click it does nothing.
If I take the code back out then the normal right click menu shows up.
This is what I added to try and get it to work.
Code:
Response.Write "<script language=""JavaScript"" type=""text/javascript"">browserChk();</script>" & vbNewline
if intShowJavaMenu = "1" then
if mlev = 0 then
strJavaMenuTop = strJavaMenuLogout
else
strJavaMenuTop = strJavaMenuLogin
end if
Response.Write "<script type=""text/javascript"" language=""javascript"" src=""java_menu/milonic_src.js""></script>" & vbNewLine
%>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenudom.js><\/scr"+"ipt>");
</script>
[color=blue]<SCRIPT language=JavaScript src="java_menu/contextmenu.js" type=text/javascript></SCRIPT>[/color]
[color=red]<!--#include file="inc_javamenu_skin.asp"-->[/color]
if intShowJavaMenu = "1" then
if mlev = 0 then
strJavaMenuTop = strJavaMenuLogout
else
strJavaMenuTop = strJavaMenuLogin
end if
Response.Write "<script type=""text/javascript"" language=""javascript"" src=""java_menu/milonic_src.js""></script>" & vbNewLine
%>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=java_menu/mmenudom.js><\/scr"+"ipt>");
</script>
[color=blue]<SCRIPT language=JavaScript src="java_menu/contextmenu.js" type=text/javascript></SCRIPT>[/color]
[color=red]<!--#include file="inc_javamenu_skin.asp"-->[/color]
The red line is the menu_data.asp picker, depending on what color they choose they get a different menu_data.asp
Blue is what I added to try and get the right click to work.
Hope this is a lil more info.
Anything else let me know.
If you got to my site I have it installed on the bluegray skin
So the other skins colors still work normal.
If you want to see the right click just does nothing click on the bluegray skin at the top right.
Thanks for your time,
Dubie[/code]
Poster: Maz
Dated: Saturday March 6 2004 - 9:47:25 GMT
What about paths, a slash before to search from root?
/java_menu/contextmenu.js
I don't know what order contextmenu.js goes
what about menu-data.js or whatever you've called it.
I'm not sure, but if you are changing colors, maybe it should be an if statement in menudata and the data file should be listed here.
I'm really out of my depth. There might have been something similar many months ago, might be a long search in the forum. At least until someone here shows up who knows javascript.
maz
Poster: Dubie
Dated: Tuesday March 16 2004 - 7:32:09 GMT
Anyone know whats all needs to be added to the menu to add the right click menu or what order the .js files need to be in?
As you can see from above I have a menu already and would like to add the right click menu to my page.
Thanks for your time,
Dubie
Poster: kevin3442
Dated: Thursday March 18 2004 - 0:59:23 GMT
Hi Dubie,
I'll assume you've downloaded the context menu sample.
In the sample, the context menu itself, along with the style it use, are defined in menu_data.js. You would put all of your other (normal) menus in there as well (or in menu_data.asp in your case). In menu_data.js, you'll notice a menu style called contextStyle and a menu called contextMenu. contextStyle is simply the style used by the contextMenu for its own look. In your own menu data (whether it's a static .js file or dynamically generated), you could use these same names, or use names of your own.
You'll also notice in the sample's menu.htm file that that the contexmenu.js file is loaded afer the other menu scripts. It doesn't matter if context.js is loaded before or after your menu_data.js (or .asp). BUT, contextmenu.js must be loaded after milonic_src.js, because the event handlers defined in contextmenu.js -- the ones that handle the right-click -- rely on a value defined in milonic_src.js.
Also, in contextmenu.js, there are two values at the top that you can set.
(1) contextDisabled is initially set to false. When this variable is set to false, the context menu will open on a right-click. When you set contextDisabled = true; then the context menu is disabled and the normal context menu for the browser should now appear on a right-click. You'll notice in the sample that the contextMenu has an option defined like so:
Code:
aI("text=Disable This Menu;url=`javascript:var contextDisabled=true;closeAllMenus();`");
That option sets contextDisabled = true, allowing the browser's normal context menu to take over. (You could even have an option in your regular menu that re-enables the contextMenu by setting contextDisabled = false again.
(2) contextMenu specifies which menu (defined in menu_data.js) will appear when the user right clicks (assuming contextDisabled=false;). In the sample, contextMenu="contextMenu"; tells the system to open the menu named "contextMenu" when the user right clicks. If you want another menu to open, specify the name of the menu in this variable; make sure to specify it as a string, with the name of the menu inside of double or single quotes. You could even programatically change which menu will open on a right click by changing the value of this string variable; it would be fairly easy to do with javascript, since contextMenu is a global variable. But that might be a topic for a later discussion
Hope that helps,
Kevin