homepage Welcome to WebmasterWorld Guest from 54.204.68.109
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
DWMX04 Library item and Show Pop-Up Menu Behavior
Library and Pop-Up Menu
Designstyle




msg:934969
 1:29 am on Jan 30, 2006 (gmt 0)

Hello,
I'm wondering if the "Show Pop-Up Menu" behavior works as a Library item in DWMX04?

Once I save it in the Library, I cannot edit the menu and when I insert it in a new document and preview in the browser the menu doesn't work.

I appreciate your help.

 

limbo




msg:934970
 12:40 pm on Jan 30, 2006 (gmt 0)

Welcome to WebmasterWorld :)

Have you pasted the Javascript into your head or into an external script. Library items are good but for scripted objects that occur repeatedly you might be better looking to templates - other types of dynamic include might be an option too.

Designstyle




msg:934971
 6:18 pm on Jan 30, 2006 (gmt 0)

Thank you Limbo. I'm working on a 70 page web site, I have 7 templates already, I have the header that includes same pop up menus for all pages and templates
In case my client wants to add any change to the menus, I have to repeat the same step for all templates, if I can use the header as a library item that will make my life much easier.

I tried to use the server side include, but once I insert the ssi, all information and graphics on my page disappears except the ssi area so there is no way to update the information on the page.

I don't know what you meant by pasting the Javascript into your head or into an external script!

Thank you again, I appreciate it.

limbo




msg:934972
 9:43 am on Jan 31, 2006 (gmt 0)

That makes sense - sharing static includes (library items) over templates is an excellent way to update a sites consistent elements - especially if you are not to familiar with other forms of include (I'd recommend you learn this too - dynamic includes are so helpful)

When I say have you included the javascript in your head - I was assuming that you were using the fireworks script for popup menus. This will create js that sits between your head tags.

If you replcate this and add it to every page as an external js file it will ensure the menus function. without it they will not work.

Adding JS as an external file is pretty simple - identify and cut the code (created by DW/FW) between the <script></script> tags and paste into a new file. Save it as popupmenu.js or something similar in a folder in your root. then add this something like this tag to the uneditable head of all you templates so it copies over your entire site:

<script language="JavaScript" type="text/JavaScript" src="javascript/popupmenu.js"></script>

Once that is done you can copy the html into a library item and add it to your all your templates.

If I've gone off on a tangent and you are not talking about this type of menu a little code sample might be a help.

Cheers, Limbo.

Designstyle




msg:934973
 3:54 am on Feb 1, 2006 (gmt 0)

Limbo, I'm not a js player, I used the DW behavior that allow me to create the pop up menus, I didn't use Fire Works either. In my next post I'll include the code for page that has the menus working fine and another post with the same menu after it is converted to a library item.

Again, thanks a lot for your help, I appreciate it.

Designstyle




msg:934974
 3:55 am on Feb 1, 2006 (gmt 0)

This code has the pop up menus, all working fine

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>BioDot enables, inspires, and educates scientists to commercialize their ideas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #C7C7C7;
}
-->
</style>
<link href="biodot_css.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function mmLoadMenus() {
if (window.mm_menu_1210115448_0) return;
window.mm_menu_1210115448_0 = new Menu("root",130,24,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#E8E9EB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_1210115448_0.addMenuItem("BioChip","location='Applications_biochip_main_page.htm'");
mm_menu_1210115448_0.addMenuItem("BioSensor","location='Applications_biosensor__main_page.htm'");
mm_menu_1210115448_0.addMenuItem("Lateral&nbsp;Flow","location='Applications_lateral_flow_main_page.htm'");
mm_menu_1210115448_0.addMenuItem("Immunoblot");
mm_menu_1210115448_0.addMenuItem("Dry&nbsp;Chemistry");
mm_menu_1210115448_0.addMenuItem("SNP&nbsp;Screening");
mm_menu_1210115448_0.addMenuItem("Low&nbsp;Volume&nbsp;PCR");
mm_menu_1210115448_0.addMenuItem("Laser&nbsp;Welding");
mm_menu_1210115448_0.fontWeight="bold";
mm_menu_1210115448_0.hideOnMouseOut=true;
mm_menu_1210115448_0.bgColor='#FFFFFF';
mm_menu_1210115448_0.menuBorder=1;
mm_menu_1210115448_0.menuLiteBgColor='#FFFFFF';
mm_menu_1210115448_0.menuBorderBgColor='#FFFFFF';
window.mm_menu_1210120033_0 = new Menu("root",130,24,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#E8E9EB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_1210120033_0.addMenuItem("Dispensing");
mm_menu_1210120033_0.addMenuItem("Cutting");
mm_menu_1210120033_0.addMenuItem("Web&nbsp;Handling");
mm_menu_1210120033_0.addMenuItem("Lamination");
mm_menu_1210120033_0.fontWeight="bold";
mm_menu_1210120033_0.hideOnMouseOut=true;
mm_menu_1210120033_0.bgColor='#FFFFFF';
mm_menu_1210120033_0.menuBorder=1;
mm_menu_1210120033_0.menuLiteBgColor='#FFFFFF';
mm_menu_1210120033_0.menuBorderBgColor='#FFFFFF';

window.mm_menu_1210120627_0 = new Menu("root",131,24,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#E8E9EB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_1210120627_0.addMenuItem("Product&nbsp;Data&nbsp;Sheets");
mm_menu_1210120627_0.addMenuItem("Product&nbsp;Videos");
mm_menu_1210120627_0.addMenuItem("Technical&nbsp;Posters");
mm_menu_1210120627_0.addMenuItem("Application&nbsp;Notes");
mm_menu_1210120627_0.fontWeight="bold";
mm_menu_1210120627_0.hideOnMouseOut=true;
mm_menu_1210120627_0.bgColor='#FFFFFF';
mm_menu_1210120627_0.menuBorder=1;
mm_menu_1210120627_0.menuLiteBgColor='#FFFFFF';
mm_menu_1210120627_0.menuBorderBgColor='#FFFFFF';

window.mm_menu_1210120935_0 = new Menu("root",130,24,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#E8E9EB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_1210120935_0.addMenuItem("Press&nbsp;Releases","location='press_releases.htm'");
mm_menu_1210120935_0.addMenuItem("Workshops");
mm_menu_1210120935_0.addMenuItem("Trade&nbsp;Shows");
mm_menu_1210120935_0.fontWeight="bold";
mm_menu_1210120935_0.hideOnMouseOut=true;
mm_menu_1210120935_0.bgColor='#FFFFFF';
mm_menu_1210120935_0.menuBorder=1;
mm_menu_1210120935_0.menuLiteBgColor='#FFFFFF';
mm_menu_1210120935_0.menuBorderBgColor='#FFFFFF';
window.mm_menu_1210121151_0 = new Menu("root",132,24,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#E8E9EB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_1210121151_0.addMenuItem("Headquarters");
mm_menu_1210121151_0.addMenuItem("Europe&nbsp;Office");
mm_menu_1210121151_0.addMenuItem("Worldwide&nbsp;Contacts");
mm_menu_1210121151_0.fontWeight="bold";
mm_menu_1210121151_0.hideOnMouseOut=true;
mm_menu_1210121151_0.bgColor='#FFFFFF';
mm_menu_1210121151_0.menuBorder=1;
mm_menu_1210121151_0.menuLiteBgColor='#FFFFFF';
mm_menu_1210121151_0.menuBorderBgColor='#FFFFFF';

window.mm_menu_0124192956_0 = new Menu("root",130,25,"Arial, Helvetica, sans-serif",12,"#0B3D91","#FFFFFF","#EAEBEB","#0B3D91","left","middle",3,1,500,-5,7,true,false,true,5,false,false);
mm_menu_0124192956_0.addMenuItem("BioChip","location='products_biochip.htm'");
mm_menu_0124192956_0.addMenuItem("BioSensor","location='products_biosensor.htm'");
mm_menu_0124192956_0.addMenuItem("Lateral&nbsp;Flow","location='products_lateral_flow.htm'");
mm_menu_0124192956_0.fontWeight="bold";
mm_menu_0124192956_0.hideOnMouseOut=true;
mm_menu_0124192956_0.bgColor='#555555';
mm_menu_0124192956_0.menuBorder=1;
mm_menu_0124192956_0.menuLiteBgColor='#FFFFFF';
mm_menu_0124192956_0.menuBorderBgColor='#777777';

mm_menu_0124192956_0.writeMenus();
} // mmLoadMenus()
//-->
</script>
<script language="JavaScript" src="mm_menu.js"></script>
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
</head>

<body>
<script language="JavaScript1.2">mmLoadMenus();</script>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="800" height="110" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="45" height="110">&nbsp;</td>
<td width="230" valign="middle"><img src="images/biodot_logo.jpg" alt="BioDot Logo" width="230" height="55"></td>
<td width="525">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td height="27" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="800" height="27" align="center" valign="top"><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210115448_0,0,27,null,'image1')" onMouseOut="MM_startTimeout();"><img src="images/biodot_applications.gif" alt="BioDot Applications" name="image1" width="130" height="27" border="0" id="image1"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120033_0,0,27,null,'image2')" onMouseOut="MM_startTimeout();"><img src="images/biodot_technologies.gif" alt="BioDot Technologies" name="image2" width="130" height="27" border="0" id="image2"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_0124192956_0,0,27,null,'image6')" onMouseOut="MM_startTimeout();"><img src="images/biodot_products.gif" alt="BioDot Products" name="image6" width="130" height="27" border="0" id="image6"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120627_0,0,27,null,'image3')" onMouseOut="MM_startTimeout();"><img src="images/biodot_resource_center.gif" alt="BioDot Resource Center" name="image3" width="130" height="27" border="0" id="image3"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120935_0,0,27,null,'image4')" onMouseOut="MM_startTimeout();"><img src="images/biodot_news_events.gif" alt="BioDot News and Events" name="image4" width="130" height="27" border="0" id="image4"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210121151_0,0,27,null,'image5')" onMouseOut="MM_startTimeout();"><img src="images/biodot_contact_us.gif" alt="Contact BioDot" name="image5" width="130" height="27" border="0" id="image5"></a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Designstyle




msg:934975
 3:56 am on Feb 1, 2006 (gmt 0)

This is the code of the same page content as a library item:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="800" height="110" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="45" height="110">&nbsp;</td>
<td width="230" valign="middle"><img src="../images/biodot_logo.jpg" alt="BioDot Logo" width="230" height="55"></td>
<td width="525">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td height="27" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="800" height="27" align="center" valign="top"><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210115448_0,0,27,null,'image1')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_applications.gif" alt="BioDot Applications" name="image1" width="130" height="27" border="0" id="image1"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120033_0,0,27,null,'image2')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_technologies.gif" alt="BioDot Technologies" name="image2" width="130" height="27" border="0" id="image2"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_0124192956_0,0,27,null,'image6')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_products.gif" alt="BioDot Products" name="image6" width="130" height="27" border="0" id="image6"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120627_0,0,27,null,'image3')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_resource_center.gif" alt="BioDot Resource Center" name="image3" width="130" height="27" border="0" id="image3"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210120935_0,0,27,null,'image4')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_news_events.gif" alt="BioDot News and Events" name="image4" width="130" height="27" border="0" id="image4"></a><a href="javascript:;" onMouseOver="MM_showMenu(window.mm_menu_1210121151_0,0,27,null,'image5')" onMouseOut="MM_startTimeout();"><img src="../images/biodot_contact_us.gif" alt="Contact BioDot" name="image5" width="130" height="27" border="0" id="image5"></a></td>
</tr>
</table></td>
</tr>
</table>

limbo




msg:934976
 12:39 pm on Feb 3, 2006 (gmt 0)

OK - from what I can see your Javascript that makes the rollovers function is not part of your librabry item. So I'd cut every thing between the <script language="JavaScript"></script> tags and save it in an external script file called somthing like popupmenu.js

Then add it to all your templates using the method I mentioned above.

This should ensure the menu functions when you insert the library include. Also your librabry item should only include the html that is needed for the popupmenu to function - no need to include the meta tags.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved