Insert CC Menu code into VSD - Page 2...

User 463058 Photo


Ambassador
1,085 posts
Online Now

Yes, that is the correct line which is located between those two messages. I did some tests and confirmed that the style attribute doesn't help anything if you fail to correctly edit the script.

So, you should have something like this (Additions or changes in bold):

<div id="themenu">

<script type='text/javascript'>

function Go(){return}

/***********************************************************************
YOU CAN MANUALLY CHANGE THE MENU HERE, BUT BE VERY CAREFUL !
***********************************************************************/

Menu1=new Array("Menu 1","","",3,20,80);
Menu1_1=new Array("Sub 1","#","",0,20,80);
Menu1_2=new Array("Sub 2","#","",0,20,0);
Menu1_3=new Array("Sub 3","#","",0,20,80);

Menu2=new Array("Menu 2","","",4,0,80);
Menu2_1=new Array("Sub 1","#","",0,20,80);
Menu2_2=new Array("Sub 2","#","",0,20,0);
Menu2_3=new Array("Sub 3","","",3,20,0);
Menu2_3_1=new Array("Sub Sub 1","#","",0,20,80);
Menu2_3_2=new Array("Sub Sub 2","#","",0,20,0);
Menu2_3_3=new Array("Sub Sub 3","#","",0,20,0);
Menu2_4=new Array("Sub 4","#","",0,20,0);

Menu3=new Array("Menu 3","#","",0,20,80);

Menu4=new Array("Menu 4","","",2,20,80);
Menu4_1=new Array("Sub 1","#","",0,20,80);
Menu4_2=new Array("Sub 2","#","",0,20,0);


var NoOffFirstLineMenus=4; // Number of first level items
var LowBgColor='#0080FF'; // Background color when mouse is not over
var LowSubBgColor='#0080FF'; // Background color when mouse is not over on subs
var HighBgColor='#009CE8'; // Background color when mouse is over
var HighSubBgColor='#009CE8'; // Background color when mouse is over on subs
var FontLowColor='#FFFFFF'; // Font color when mouse is not over
var FontSubLowColor='#FFFFFF'; // Font color subs when mouse is not over
var FontHighColor='#0000FF'; // Font color when mouse is over
var FontSubHighColor='#0000FF'; // Font color subs when mouse is over
var BorderColor='#000000'; // Border color
var BorderSubColor='#000000'; // Border color for subs
var BorderWidth=1; // Border width
var BorderBtwnElmnts=1; // Border between elements 1 or 0
var FontFamily="Tahoma, Verdana, Arial" // Font family menu items
var FontSize=10; // Font size menu items
var FontBold=0; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.2; // horizontal overlap child/ parent
var ChildVerticalOverlap=.2; // vertical overlap child/ parent
var StartTop=1; // Menu offset x coordinate
var StartLeft=1; // Menu offset y coordinate
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=3; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
var DissapearDelay=1000; // delay before menu folds in
var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
var FirstLineFrame='navig'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='space'; // Frame where target documents appear
var TargetLoc='themenu'; // span (or div) id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=1; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=0; // menu tree checking on or off 1 or 0
var ShowArrow=1; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highligthed
var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5,10]; // Arrow source, width and height


/***********************************************************************
DO NOT EDIT ANYTHING BELOW THIS LINE - IT WILL BREAK THE SCRIPT !
***********************************************************************/

var AgntUsr=navigator.userAgent.toLowerCase();
var DomYes=document.getElementById?1:0;
var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
var Opr=AgntUsr.indexOf('opera')!=-1?1:0;
var Opr6orless=window.opera && navigator.userAgent.search(/opera.[1-6]/i)!=-1 //DynamicDrive.com added code
if ( Opr6orless!=1 ) { ExpYes = 1 }
var DomNav=DomYes&&NavYes?1:0;
var DomExp=DomYes&&ExpYes?1:0;
...
...
...a whole bunch of code...
...
...
function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}

</script>
<noscript>Your browser does not support script</noscript>

<!-- REST OF BODY CONTENT BELOW HERE -->

</div>
User 463058 Photo


Ambassador
1,085 posts
Online Now

I've been doing more testing. While the above works fine for IE 8, you need the dhtmldat.exe file so it will work in Firefox and other browsers as well. I thought this was just the case with strict doctypes, but it also seems to apply to transitional doctypes as well.

It's a self-extracting file, not any kind of installer. It includes instructions. After you have manually replaced your DHTML menu's dat file, you will need to start up the menu program so you can reload your saved menu's .mnu file. Then get the code for it again and use that new code in VSD.
User 513087 Photo


Registered User
6 posts

Nice work! That did the trick. THANK YOU!

While we're at it, I notice that when I past a vertical menu into VSD, I don't get my formatting lines or the arrows to the right of the text. It does, however, show up when I do the DHTML Menu "preview" so I know it is not a browser issue.

Any suggestions as to code I could add to keep the formatting, or is that a more fundamental conflict between VSD and DHTML?
User 355448 Photo


Ambassador
3,144 posts

Paul,

For the arrows to work, you need to upload those arrows to the same location as the menu. If the page with the menu is located in your root folder (along with your home or index page), then your arrows need to be there, or you need to change the arrow location in the menu code.

I'm a website beginner and this is an actual (small) business site, so I can't take any chances uploading the wrong thing.

Use a FTP program to create a test folder (directory) on the site. Upload your test page to the test folder using the FTP program. That is one way you can test how the page will actually look.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.