<XMP><body><!--'"</title></head>--> <script type="text/javascript"> //OwnerIQ var __oiq_pct = 50; if( __oiq_pct>=100 || Math.floor(Math.random()*100/(100-__oiq_pct)) > 0 ) { var _oiqq = _oiqq || []; _oiqq.push(['oiq_addPageBrand','Lycos']); _oiqq.push(['oiq_addPageCat','Internet > Websites']); _oiqq.push(['oiq_addPageLifecycle','Intend']); _oiqq.push(['oiq_doTag']); (function() { var oiq = document.createElement('script'); oiq.type = 'text/javascript'; oiq.async = true; oiq.src = document.location.protocol + '//px.owneriq.net/stas/s/lycosn.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(oiq, s); })(); } /////// Google Analytics var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-21402695-21']); _gaq.push(['_setDomainName', 'angelfire.com']); _gaq.push(['_setCustomVar', 1, 'member_name', 'commandstation', 3]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); ////// Lycos Initialization ///////////////////// var lycos_ad = Array(); var lycos_search_query = ""; var lycos_onload_timer; var cm_role = "live"; var cm_host = "angelfire.lycos.com"; var cm_taxid = "/memberembedded"; var angelfire_member_name = "commandstation"; var angelfire_member_page = "commandstation/it/truedoc.htm"; var angelfire_ratings_hash = "1745601995:eb5ab5d63cc372c46d46a4fd7b17d64c"; var lycos_ad_category = null; var lycos_ad_remote_addr = "209.202.244.9"; var lycos_ad_www_server = "www.angelfire.lycos.com"; var edit_site_url = "www.angelfire.lycos.com/landing/landing.tmpl?utm_source=house&utm_medium=landingpage&utm_campaign=toolbarlink"; </script> <script type="text/javascript" src="https://scripts.lycos.com/catman/init.js"></script> <script type='text/javascript'> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); </script> <script type='text/javascript'> googletag.cmd.push(function() { googletag.defineSlot('/95963596/ANG_300x250_dfp', [300, 250], 'div-gpt-ad-1450207484070-0').addService(googletag.pubads()); googletag.enableServices(); }); </script> <script type='text/javascript'> googletag.cmd.push(function() { googletag.defineSlot('/95963596/ANG_above_728x90_dfp', [728, 90], 'div-gpt-ad-1450207484070-1').addService(googletag.pubads()); googletag.enableServices(); }); </script> <script type='text/javascript'> googletag.cmd.push(function() { googletag.defineSlot('/95963596/ANG_below_728X90_dfp', [728, 90], 'div-gpt-ad-1450207484070-2').addService(googletag.pubads()); googletag.enableServices(); }); </script> <script type="text/javascript"> (function(isV) { if (!isV) { return; } //this.lycos_search_query = lycos_get_search_referrer(); var adMgr = new AdManager(); var lycos_prod_set = adMgr.chooseProductSet(); var slots = ["leaderboard", "leaderboard2", "toolbar_image", "toolbar_text", "smallbox", "top_promo", "footer2","slider"]; var adCat = this.lycos_ad_category; adMgr.setForcedParam('page', (adCat && adCat.dmoz) ? adCat.dmoz : 'member'); if (this.lycos_search_query) { adMgr.setForcedParam("keyword", this.lycos_search_query); } else if (adCat && adCat.find_what) { adMgr.setForcedParam('keyword', adCat.find_what); } for (var s in slots) { var slot = slots[s]; if (adMgr.isSlotAvailable(slot)) { this.lycos_ad[slot] = adMgr.getSlot(slot); } } adMgr.renderHeader(); adMgr.renderFooter(); }((function() { var w = 0, h = 0, minimumThreshold = 300; if (top == self) { return true; } if (typeof(window.innerWidth) == 'number' ) { w = window.innerWidth; h = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { w = document.documentElement.clientWidth; h = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { w = document.body.clientWidth; h = document.body.clientHeight; } return ((w > minimumThreshold) && (h > minimumThreshold)); }()))); window.onload = function() { var f = document.getElementById("lycosFooterAd"); var b = document.getElementsByTagName("body")[0]; b.appendChild(f); f.style.display = "block"; document.getElementById('lycosFooterAdiFrame').src = '/adm/ad/footerAd.iframe.html'; // Slider Injection (function() { var e = document.createElement('iframe'); e.style.border = '0'; e.style.margin = 0; e.style.display = 'block'; e.style.cssFloat = 'right'; e.style.height = '254px'; e.style.overflow = 'hidden'; e.style.padding = 0; e.style.width = '300px'; })(); // Bottom Ad Injection ( function() { var b = document.getElementsByTagName("body")[0]; var iif = document.createElement('iframe'); iif.style.border = '0'; iif.style.margin = 0; iif.style.display = 'block'; iif.style.cssFloat = 'right'; iif.style.height = '254px'; iif.style.overflow = 'hidden'; iif.style.padding = 0; iif.style.width = '300px'; iif.src = '/adm/ad/injectAd.iframe.html'; var cdiv = document.createElement('div'); cdiv.style = "width:300px;margin:10px auto;"; cdiv.appendChild( iif ); if( b ) { b.insertBefore(cdiv, b.lastChild); } })(); } </script> <style> #body .adCenterClass { margin:0 auto; display:block !important; overflow:hidden; width:100%; } #body .adCenterClass #ad_container { display:block !important; float:left; width:728px; } @media (min-width: 768px) { <!-- For 300px or less ads ONLY --> #body .adCenterClass #ad_container { width: calc(100% - 372px); } } @media (min-width: 1110px) { <!-- For 728px or less ads --> #body .adCenterClass #ad_container { width: calc(100% - 372px); } } </style> <div style="background:#abe6f6; border-bottom:1px solid #507a87; position:relative; z-index:9999999"> <div class="adCenterClass"> <a href="https://www.angelfire.lycos.com/" title="Angelfire.com: build your free website today!" style="display:block; float:left; width:186px; border:0"> <img src="/adm/ad/angelfire-freeAd.jpg" alt="Site hosted by Angelfire.com: Build your free website today!" style="display:block; border:0" /> </a> <div id="ad_container"> <script type="text/javascript">document.write(lycos_ad['leaderboard']);</script> </div> </div> </div> <!-- ///////////////////////////////////// --> <script type="text/javascript">document.write(lycos_ad['slider']);</script> <div id="lycosFooterAd" style="background:#abe6f6; border-top:1px solid #507a87; clear:both; display:none; position:relative; z-index:9999999"> <div class="adCenterClass" style="display:block!important; overflow:hidden; width:936px;"> <div id="aflinksholder" style="float:left; width:186px;"> <a href="https://www.angelfire.lycos.com/" title="Angelfire.com: build your free website today!" style="display:block; border:0"> <img src="/adm/ad/angelfire-freeAd2.jpg" alt="Site hosted by Angelfire.com: Build your free website today!" style="display:block; border:0" /> </a> </div> <iframe id="lycosFooterAdiFrame" style="border:0; display:block; float:left; height:96px; overflow:hidden; padding:0; width:750px"></iframe> </div> </div> <!--- UNDERDOGMEDIA EDGE_lycos.com JavaScript ADCODE START---> <script data-cfasync="false" language="javascript" async src="//udmserve.net/udm/img.fetch?sid=17754;tid=1;dt=6;"></script> <!--- UNDERDOGMEDIA EDGE_lycos.com JavaScript ADCODE END---> </xmp>

Adding Actions:

Now that we have created the main menus and the sub menus, we need to activate them. We will start by making an Action Group that will hide all of the menus. Open the head section of the page by clicking the small triangle in the upper left of the layout window and drag a Head Action over from the Smart tab of the Objects palette. Change it from OnLoad (the default) to OnCall, and give it a name such as "clearmenu".

Now set the action to Specials > Action Group. In the Action Group add 3 actions (or 1 for each submenu). Set each of them to a Multimedia > ShowHide action. In each of those actions select one of the submenu FBs and set it to Hide. Now we have an action group that can be called a number of different times on the page to hide all the submenus.

Next hide all of the FBs, if they aren't already hidden from the previous page of this tutorial. Click on the first main menu button image and turn it into a link. In the Link tab of the inspector, set the link to "#" (without the quotes). Now go to the Action palette and select the Mouse Enter event. Add an action to it and set that action to be a Multimedia > Show Hide action. In the action, select the FB that contains the submenu for this menu button, and set it to Show. That's the only action we are adding to this button, so this one is done. Now repeat the above steps for the rest of the menu buttons, making each a link to "#" and adding a ShowHide action to the Mouse Enter event that will show the submenu for that menu button.

Now we need to add the actions to the submenus. In the Floating Box palette, select the first submenu FB and set it back to Visible. Click on the transparent gif on the left side and turn it into a link. Set it's URL to "#". Go to the Action palette and add an action to it's Mouse Enter event. Set this action to Specials > Call Action. In the action, select the name of the Head Action you created (clearmenu). Next click the gif on the right and do exactly the same thing. Finally, select the one under the submenu and do the same thing for that one.

Now hide the FB and unhide the next one. Do the same procedure for the transparent gifs in this one. Then hide it and do the same for the third one.

There is one more step to get the basic function of showing and hiding the menus to work properly. If you are not used to using the Source View, then it may seem complex, but it really isn't.

Drag a Javascript icon from the Head tab of the Objects palette into the head section of your page. Click the javascript icon, then click the Edit button in the inspector. A script editing window pops up. Copy and paste the following code into that window.

 

if(document.layers) {
document.write('<style media="screen" type="text/css"><!--\n');
    document.write(CSS HERE}\n");
    document.write(CSS HERE}\n");
    document.write(CSS HERE}\n");
    document.write("--></style>\n");
}

 

There are three lines in there that contain "CSS HERE" in them. These lines must be repeated once for every submenu that you have on the page. Close the javascript editor.

Now you need to switch over to source view. Scroll to the top of the page. You will see a section that starts with a <style> tag and ends with a </style> tag. Between these are the CSS definitions for the submenu FBs. You need to, one at a time, copy these lines and paste them in to replace the CSS HERE in the corresponding line of javascript below them. Do not delete the CSS lines that are there. You need to duplicate them inside the javascript lines.

For example, in the page we have been creating there is a CSS line that says:

#menu1 { position: absolute; z-index: 10; top: 0px; left: 0px; width: 100%; height: 218px; visibility: hidden }

When this is used to replace the CSS HERE in the first javascript line, that line then looks like:

document.write("#menu1 { position: absolute; z-index: 10; top: 0px; left: 0px; width: 100%; height: 218px; visibility: hidden }\n");

Remember, you do not get rid of the line you are copying. You are duplicating that text into the javascript line.

Now look in each of the lines you have created and find the part that says "100%". Change that to "250%". So the line now looks like:

document.write("#menu1 { position: absolute; z-index: 10; top: 0px; left: 0px; width: 250%; height: 218px; visibility: hidden }\n");

Do that to each of the new lines. Do not change the original lines that you copied from.

OK. You can switch back to layout view and save your page. It is done as far as the basic function of showing and hiding the submenus. Next we need to make the menus actually do something.

 

Download all images:




Download HTML here

Back to Main Menu