Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:16

{SOLVED} How to load different menu_data.js based on browser


Poster: rajupvv
Dated: Thursday January 26 2006 - 2:44:31 GMT

Hi,

I have 2 menu_data.js files. One, for Safari browser and another one for all the other browsers.

Can any body please provide code that would help me to load a menu_data.js file if the user is using Safari browser and other menu_data.js files if it is any other browser.

Raju.


Poster: Ruth
Dated: Thursday January 26 2006 - 2:51:55 GMT

Hi Raju,

Could you tell us why you are doing this? I'm not sure it would be a perfect thing if it's possible. I think it would take some kind of browser detect script and I don't know that those work well. You might end up with someone having no menu.

Is there something that we might possibly fix so that you can use the same menu_data.js file for all browsers?

Ruth


Poster: rajupvv
Dated: Thursday January 26 2006 - 12:45:53 GMT

Hi Ruth,

Please have a look at this image which shows the menu layout I am working on [img]file:///C:/Jeff/Copy_of_index.htm[/img].

Second horizontal menu width is 765 pixes, by setting menuwidth value to 765 it is coming properly in all browsers (IE, Netscape and Firefox) on both PC and Mac. But when opened in Safari it ended up wider than the top menu. But when I decreased width it looked good in Safari. And the strange thing is for each one of the items in the top horizontal menu (that has an associated 2nd horizontal menu) I ended up specify different widths to make them look as wide as the top one.

So I thought if there is code to identify that client is using Safari use one menu_data.js and for all other remaining browsers use other menu_data.js.

Raju.


Poster: rajupvv
Dated: Thursday January 26 2006 - 12:49:27 GMT

Hi Ruth,

Looks like the screen shot image is not uploaded and as I am inside firewall and there is no way my website address will work. Can you please suggest me where I can post the image so that you can have a look.

Raju.


Poster: Ruth
Dated: Thursday January 26 2006 - 16:08:41 GMT

Hi,

I have no idea. The 'url' you posted looks to be the path on your computer c drive rather than a website address. Don't you have a website where you can upload the image?

Ruth


Poster: Ruth
Dated: Thursday January 26 2006 - 16:10:46 GMT

Also, since I forgot to ask it, is there not a page on the web so we can see what's going on? There may be something in the style sheet that causes this problem.

Ruth


Poster: rajupvv
Dated: Friday January 27 2006 - 16:06:02 GMT

Hi Ruth,

As I don't have access to any internet site where I can upload my pages. Here is URL http://pg.photos.yahoo.com/ph/belkatfar/detail?.dir=/19db&.dnm=5a9b.jpg&.src=ph of the screen shot of menu taken in IE.

Also here is the code that is working in all the browsers except in Safari where the 2nd menu is wider than the top one.

Code from the .html file
Code:
<body onload="window.defaultStatus='www.lumen-legal.com wireframe';MM_preloadImages('images/images/submitres_over.gif','images/images/login_over.gif','images/images/findjob_over.gif','images/images/diversity_over.gif','images/images/subscribe_over.gif','images/images/industry_over.gif','images/images/careers_over.gif','images/images/offshore_over.gif')">
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">DHTML JavaScript Website Pull Down Navigation Menu By Milonic</a></noscript>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data_sub.js"></script>

<!--
    Milonic DHTML Website Navigation Menu Version 5.0+
    Copyright 2005 (c) Milonic Solutions Limited (UK). All Rights Reserved.
    Please visit http://www.milonic.com/ for more information.

    Although this software may have been freely downloaded, you must obtain a license before using it in any production environment.
    The free use of this menu is only available for Non-Profit, Educational & Personal Web Sites who have obtained a license to use.

    Free, Commercial and Corporate Licenses are available from our website.
    You also need to include a link back to http://www.milonic.com/ if you use the free license.

    All Copyright notices MUST remain in place at ALL times.
    This includes the first three lines of this notice on every page that uses the menu.
    If you cannot comply with all of the above requirements, please contact us to arrange a license waiver.
-->

<!--   ***** This is the section of code you need to paste into your web page *****-->

<div id="container">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><div id="topbar"><img src="images/topbar_home.gif" /></div></td></tr>

<!-- Insert into Menu code Here -->

<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="lines">
<script type="text/javascript" src="menu_data_main.js"></script>
</td></tr>
</table>
</td>
</tr>


Code from loading the top menu (mainMenu)
Code:
with(menuStyle=new mm_style()){
borderwidth=0;
fontfamily="Verdana, Arial, Tahoma";
fontsize="60%";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#e5e5e5";
itemheight=22;
itemwidth=120;
offbgcolor="#e5e5e5";
offcolor="#666666";
onbgcolor="#666666";
oncolor="#ffffff";
padding=0;
pagebgcolor="#666666";
pagecolor="#ffffff";
separatorcolor="#ffffff";
separatorsize=4;
}

with(milonic=new menuname("Main Menu")){
align="center";
alwaysvisible=1;
menualign="center";
orientation="horizontal";
position="relative";
style=menuStyle;
aI("text=&nbsp;type=header;itemwidth=15;offborder=1px solid #7d7d7d;");
aI("showmenu=FOR CANDIDATES;text=FOR CANDIDATES;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;url=http://www.google.com;");
aI("showmenu=FOR CLIENTS;text=FOR CLIENTS;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;");
aI("showmenu=SERVICES;text=SERVICES;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;url=file:///C:/Jeff/Copy_of_index.htm;");
aI("showmenu=ABOUT US;text=ABOUT US;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;");
aI("showmenu=RESOURCES;text=RESOURCES;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;");
aI("showmenu=NEWSROOM;text=NEWSROOM;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;");
aI("text=&nbsp;type=header;itemwidth=15;offborder=1px solid #7d7d7d;");
}

drawMenus();


Code for loading the 2nd horizontal and 3rd vertical menu
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(secondMenuStyle=new mm_style()){
align="center";
bordercolor="#666666";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Arial, Tahoma";
fontsize="60%";
fontstyle="normal";
fontweight="bold";
itemheight=22;
offbgcolor="#999999";
offcolor="#cccccc";
onbgcolor="#999999";
oncolor="#ffffff";
padding=0;
separatorcolor="#999999";
separatorsize=5;
}

with(verticalMenuStyle=new mm_style()){
bordercolor="#7d7d7d";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Arial, Tahoma";
fontsize="60%";
fontstyle="normal";
offbgcolor="#e5e5e5";
offcolor="#999999";
onbgcolor="#e5e5e5";
oncolor="#333333";
padding=4;
separatorcolor="#ffffff";
separatorsize=1;
}

with(milonic=new menuname("FOR CANDIDATES")){
align="left";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=1;");
aI("showmenu=SEARCH JOBS;text=SEARCH JOBS;url=http://www.a-q.co.uk/;itemwidth=117;");
aI("showmenu=SUBMIT RESUME;text=SUBMIT RESUME;url=http://www.sms2email.com/;itemwidth=139;");
aI("showmenu=BENEFITS PACKAGE;text=BENEFITS PACKAGE;url=http://www.softidiom.com/?milonicmenu;itemwidth=147;");
aI("showmenu=CONTACT US;text=CONTACT US;url=http://www.a-q.co.uk/;itemwidth=105;");
aI("showmenu=RESUME TIPS;text=RESUME TIPS;url=http://www.sms2email.com/;itemwidth=127;");
aI("showmenu=INTERVIEW TIPS;text=INTERVIEW TIPS;url=http://www.softidiom.com/?milonicmenu;itemwidth=127;");
aI("text=&nbsp;type=header;itemwidth=2;");
}

with(milonic=new menuname("FOR CLIENTS")){
align="left";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=1;");
aI("showmenu=CORPORATIONS;text=CORPORATIONS;url=http://www.a-q.co.uk/;itemwidth=135;");
aI("showmenu=LAW FIRMS;text=LAW FIRMS;url=http://www.sms2email.com/;itemwidth=120;");
aI("showmenu=GOVERNMENT/NON PROFIT;text=GOVERNMENT/NON PROFIT;url=http://www.softidiom.com/?milonicmenu;itemwidth=200;");
aI("text=&nbsp;type=header;itemwidth=309;");
}

with(milonic=new menuname("SERVICES")){
align="left";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=140;");
aI("showmenu=CONTRACT STAFFING;text=CONTRACT STAFFING;itemwidth=200;");
aI("showmenu=DIRECT HIRE SEARCH;text=DIRECT HIRE SEARCH;itemwidth=200;");
aI("showmenu=DOCUMENT REVIEW;text=DOCUMENT REVIEW;itemwidth=200;");
aI("text=&nbsp;type=header;itemwidth=223;");
}

with(milonic=new menuname("ABOUT US")){
align="center";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=1;");
aI("showmenu=LUMEN LEGAL DIFFERENCE;text=SEARCH JOBS;url=http://www.milonic.com/cbuy.php;itemwidth=70;");
aI("text=&nbsp;type=header;itemwidth=20;");
aI("showmenu=OUR TEAM;text=OUR TEAM;url=http://www.milonic.com/cbuy.php;itemwidth=55;");
aI("text=&nbsp;type=header;itemwidth=25;");
aI("showmenu=OUR VALUES;text=OUR VALUES;url=http://www.milonic.com/cbuy.php;itemwidth=50;");
aI("text=&nbsp;type=header;itemwidth=25;");
aI("showmenu=IN THE NEWS;text=IN THE NEWS;url=http://www.milonic.com/cbuy.php;itemwidth=95;");
aI("text=&nbsp;type=header;itemwidth=25;");
aI("showmenu=GEOGRAPHIC SCOPE;text=GEOGRAPHIC SCOPE;url=http://www.milonic.com/cbuy.php;itemwidth=95;");
aI("text=&nbsp;type=header;itemwidth=20;");
aI("showmenu=OUR CLIENTS;text=OUR CLIENTS;url=http://www.milonic.com/cbuy.php;itemwidth=50;");
aI("text=&nbsp;type=header;itemwidth=20;");
aI("showmenu=BUSINESS PARTNERS;text=BUSINESS PARTNERS;url=http://www.milonic.com/cbuy.php;itemwidth=95;");
aI("text=&nbsp;type=header;itemwidth=20;");
aI("showmenu=CONTACT US;text=CONTACT US;url=http://www.milonic.com/cbuy.php;itemwidth=95;");
aI("text=&nbsp;type=header;itemwidth=4;");
}

with(milonic=new menuname("RESOURCES")){
align="left";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=464;");
aI("showmenu=FOR CANDIDATES SUBMENU;text=FOR CANDIDATES;itemwidth=150;");
aI("showmenu=FOR CLIENTS SUBMENU;text=FOR CLIENTS;itemwidth=150;");
aI("text=&nbsp;type=header;itemwidth=1;");
}

with(milonic=new menuname("NEWSROOM")){
align="left";
left="offset=0";
menualign="left";
menuwidth="765";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=47";
aI("text=&nbsp;type=header;itemwidth=564;");
aI("showmenu=CURRENT PRESS RELEASES;text=CURRENT PRESS RELEASES;url=http://www.milonic.com/login.php;itemwidth=200;");
aI("text=&nbsp;type=header;itemwidth=1;");
}

with(milonic=new menuname("SEARCH JOBS")){
top="offset=3";
style=verticalMenuStyle;
aI("text=SUBMIT RESUME;url=http://www.milonic.com/contactus.php;");
aI("text=BENEFITS PAKAGE;url=http://www.milonic.com/newsletter.php;");
aI("text=CONTACT US;url=http://www.milonic.com/menufaq.php;");
aI("text=RESUME TIPS;url=http://www.milonic.com/forum/;");
aI("text=INTERVIEW TIPS;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("CORPORATIONS")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CASE STUDIES;url=http://www.milonic.com/cbuy.php;");
aI("text=CONTRACT STAFFING;url=http://www.milonic.com/contactus.php;");
aI("text=DIRECT HIRE SEARCH;url=http://www.milonic.com/newsletter.php;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/menufaq.php;");
aI("text=DOCUMENT REVIEW;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("LAW FIRMS")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CASE STUDIES;url=http://www.milonic.com/cbuy.php;");
aI("text=CONTRACT STAFFING;url=http://www.milonic.com/contactus.php;");
aI("text=DIRECT HIRE SEARCH;url=http://www.milonic.com/newsletter.php;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/menufaq.php;");
aI("text=DOCUMENT REVIEW;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("GOVERNMENT/NON PROFIT")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CONTRACT STAFFING;url=http://www.milonic.com/contactus.php;");
aI("text=DIRECT HIRE SEARCH;url=http://www.milonic.com/newsletter.php;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/menufaq.php;");
aI("text=DOCUMENT REVIEW;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("CONTRACT STAFFING")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CASE STUDIES;url=http://www.milonic.com/cbuy.php;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/contactus.php;");
aI("text=SEARCH CANDIDATES;url=http://www.milonic.com/newsletter.php;");
aI("text=WHITE PAPERS;url=http://www.milonic.com/menufaq.php;");
aI("text=OFFSHORE-LEGAL-SERVICES.COM;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("DIRECT HIRE SEARCH")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CASE STUDIES;url=http://www.milonic.com/cbuy.php;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/contactus.php;");
aI("text=SEARCH CANDIDATES;url=http://www.milonic.com/newsletter.php;");
}

with(milonic=new menuname("DOCUMENT REVIEW")){
top="offset=3";
style=verticalMenuStyle;
aI("text=CASE STUDIES;url=http://www.milonic.com/cbuy.php;");
aI("text=WHITE PAPERS;url=http://www.milonic.com/menufaq.php;");
aI("text=OFFSHORE-LEGAL-SERVICES.COM;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("LUMEN LEGAL DIFFERENCE")){
top="offset=3";
style=verticalMenuStyle;
aI("text=OUR TEAM;url=http://www.milonic.com/cbuy.php;");
aI("text=OUR CORE;url=http://www.milonic.com/menufaq.php;");
aI("text=IN THE NEWS;url=http://www.milonic.com/forum/;");
aI("text=GEOGRAPHIC SCOPE;url=http://www.milonic.com/forum/;");
aI("text=OUR CLIENTS;url=http://www.milonic.com/forum/;");
aI("text=BUSINESS PARTNERS;url=http://www.milonic.com/forum/;");
aI("text=CONTACT US;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("FOR CANDIDATES SUBMENU")){
top="offset=3";
style=verticalMenuStyle;
aI("text=RESUME TIPS;url=http://www.milonic.com/cbuy.php;");
aI("text=INTERVIEW TIPS;url=http://www.milonic.com/menufaq.php;");
aI("text=WHITE PAPERS;url=http://www.milonic.com/forum/;");
aI("text=ARTICLES OF INTEREST;url=http://www.milonic.com/forum/;");
aI("text=INDUSTRY LINKS;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("FOR CLIENTS SUBMENU")){
top="offset=3";
style=verticalMenuStyle;
aI("text=WHITE PAPERS;url=http://www.milonic.com/cbuy.php;");
aI("text=ARTICLES OF INTEREST;url=http://www.milonic.com/menufaq.php;");
aI("text=INDUSTRY LINKS;url=http://www.milonic.com/forum/;");
aI("text=STAFFING LINKS;url=http://www.milonic.com/forum/;");
aI("text=REQUEST STAFFING;url=http://www.milonic.com/forum/;");
}

with(milonic=new menuname("CURRENT PRESS RELEASES")){
top="offset=3";
style=verticalMenuStyle;
aI("text=ARCHIEVED RELEASES;url=http://www.milonic.com/cbuy.php;");
aI("text=WHITE PAPERS;url=http://www.milonic.com/menufaq.php;");
aI("text=IMAGES;url=http://www.milonic.com/forum/;");
aI("text=BIOS;url=http://www.milonic.com/forum/;");
aI("text=FAST FACTS;url=http://www.milonic.com/forum/;");
aI("text=OFFSHORE-LEGAL-SERVICES.COM;url=http://www.milonic.com/forum/;");
}

drawMenus();
.

Please advise.

Raju.
[/url]


Poster: Ruth
Dated: Friday January 27 2006 - 17:29:42 GMT

Hi,

What you didn't post is the css file, which we also need. I don't know that it's something in that, but I notice you still have the menu in a div, and I'm wondering if that is the problem. Having it in the div may do something to the submenu width in Safari. Do you have a screenshot of the safari problem?

From what I see in the picture, it would seem you could put the header section of the page outside the container div and still achieve your layout.

Code:
<html>
<head>
   <title>Untitled</title>
   <style type="text/css">
   body{margin:0px}
   .topbar{background: url(topbar_home.gif);background-repeat:repeat}
   </style>
</head>

<body><script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">DHTML JavaScript Website Pull Down Navigation Menu By Milonic</a></noscript>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data_sub.js"></script>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td><div id="topbar" class="topbar"><img src="topbar_home3.gif" /></div></td></tr>

<!-- Insert into Menu code Here -->

<tr>
<td valign="bottom" align="center">
<table cellpadding="0" cellspacing="0" border="0" width="765">
<tr><td class="lines">
<script type="text/javascript" src="embed_main.js"></script>
</td></tr>
</table>
</td>
</tr>
<div id="container">

</body>
</html>


This would seem, from what I can see to give you the same layout, but put the topbar_home.gif background and the menu at the top of the page, and outside the div container. Of course without the css for where all this goes I'm only guessing, but it looks like you have it set to have a centered layout. This should make the main table 100% width, making that topbar_home.gif expand 100%, then the table inside this for the menu should be 765 wide and centered inside that td.

Other than these suggestions, I can only suggest that perhaps someone who knows javascript functions perhaps can write one that would load one file based on safari and another on all other browsers, but browser detecting is notoriously problematic, it doesn't necessarily work as it should for all browsers.

Ruth


Poster: rajupvv
Dated: Friday January 27 2006 - 19:26:10 GMT

Hi Ruth,

I am sorry that I missed the content from the .css file.

Code:


body {
   background: #ccc;
   color: #000;
   margin: 0;
   padding: 0;
   border: 0;
}

p {
   margin-top: 0;
   margin-bottom: 1em;
   font-size: 11px;
   font-family: Arial, Helvetica, sans-serif;
}

a:link, a:visited {
   font-family: verdana;
   font-weight: bold;
   text-decoration: none;
   color: #999999;
   background: transparent;
   font-size: 9px;
}

a:hover {
   text-decoration: none;
   color: black;
   background: transparent;
   font-size: 9px;
}

a:active {
   text-decoration: none;
   color: black;
   background: transparent;
   font-size: 9px;
}

/* header fonts */

h1, h2, h3, h4, h5, h6 {
   font-weight: normal;
   font-family: Arial, Helvetica, sans-serif;
}

h1 {
   margin-top: 0;
   margin-bottom: 0;
   font-size: 32px;
   text-transform: lowercase;
}

h2 {
   font-size: 24px;
   margin-top: 25px;
   margin-bottom: 0;
   letter-spacing: 1px;
}

h3 {
   font-size: 16px;
   margin-top: 0;
   margin-bottom: 0;
}

h4 {
   font-size: 13px;
   margin: 5px 0;
   padding: 0;
   letter-spacing: 1px;
}

#container {
   margin: 0 auto;
   padding: 0;
   background: #fff;
   border: 1px solid #000;
   width: 767px; /* false value for IE4-5.x/Win, like so: */
   voice-family: "\"}\""; /* real width + l/r border + l/r padding = false value */
   voice-family: inherit; /* end false value for IE4-5.x/Win */
   width: 765px; /* real value for compliant browsers */
}

html>#container {
   width: 765px; /* be nice to Opera */
}

table {
   margin: 0;
   padding: 0;
   border: 0;
}

#topbar {
   width: 765px;
   height: 17px;
}

#nav {
   width: 765px;
   height: 25px;
}

.lines {
   padding-top: 1px;
   padding-bottom: 1px;
   border-top: 1px solid #7d7d7d;
   border-bottom: 1px solid #7d7d7d;
}

#logo {
   width: 269px;
   height: 73px;
   margin-top: 12px;
   float: left;
}

#tertiary {
   width: 256px;
   float: right;
   margin-top: 64px;
   font-family: verdana;
   font-size: 9px;
   font-weight: bold;
   text-transform: uppercase;
   color: #999999;
}

#swoosh {
   width: 269px;
   height: 223px;
   float: left;
}

#main_img {
   width: 496px;
   height: 223px;
   float: left;
}

#secondary {
   width: 269px;
   float: left;
}

html>body div#secondary ul {
   list-style-type: none;
   margin-top: 15px;
   margin-left: -15px;
}

#secondary ul {
   list-style-type: none;
   margin-top: 15px;
   margin-left: 25px;
}

.copyright {
   margin-left: 25px;
   color: #cccccc;
   font-family: verdana;
   font-size: 9px;
}

#copy {
   width: 496px;
   margin-top: 15px;
   float: left;
}

.headline {
   float: left;
}

#left {
   width: 125px;
   font-family: verdana;
   font-size: 11px;
   float: left;
   margin-left: 2px;
   margin-top: 10px;
   margin-right: 15px;
}

#center {
   width: 170px;
   font-family: verdana;
   font-size: 11px;
   float: left;
   margin-top: 10px;
   margin-right: 15px;
}

#right {
   width: 125px;
   font-family: verdana;
   font-size: 11px;
   float: left;
   margin-top: 10px;
}


Raju.


Poster: rajupvv
Dated: Friday January 27 2006 - 23:20:31 GMT

Hi Ruth,

I figured out on how to dynamically load the different menu_data.js files.

Thanks a lot for all your support.

Raju.


Poster: Ruth
Dated: Saturday January 28 2006 - 1:58:52 GMT

Hi,

Could you post how you are doing that? It might be something someone else can use, also.

Ruth


Poster: rajupvv
Dated: Tuesday January 31 2006 - 18:47:20 GMT

Hi Ruth,

Here is the code.

Code:
Javascript code which tests client browser and loads different .js files based on if the browser is Safari or not.

<script language="JavaScript" type="text/JavaScript">
// Global Variable to store if the browser is Safari or not
var isSafari=0;

// Detect if browser is Safari or not and update isSafari Global variable
function detectBrowser() {
var userAgent = navigator.userAgent.toLowerCase();
isSafari = userAgent.indexOf("safari");
}

// Function which loads different submenus .js files based on the browser
function loadSubMenu() {
if (isSafari > 0) {
document.write("<scr"+"ipt type=text/javascript src=menu_data_sub.js><"+"\/scr"+"ipt>")
}
else {
document.write("<scr"+"ipt type=text/javascript src=menu_data_safari_sub.js><"+"\/scr"+"ipt>")
}
}

// Function which loads different mainmenu .js files based on the browser
function loadMainMenu() {
if (isSafari > 0) {
document.write("<scr"+"ipt type=text/javascript src=menu_data_main.js><"+"\/scr"+"ipt>")
}
else {
document.write("<scr"+"ipt type=text/javascript src=menu_data_safari_main.js><"+"\/scr"+"ipt>")
}
}
</script>

// Here is the code in the <body> tag of the HTML that call the above two functions.
<script type="text/javascript">
detectBrowser();
if (isSafari < 0)
_d.write("<scr"+"ipt type=text/javascript src=menu_data_sub.js><\/scr"+"ipt>");
else
_d.write("<scr"+"ipt type=text/javascript src=menu_data_safari_sub.js><\/scr"+"ipt>");
</script>

<script>
if (isSafari < 0)
_d.write("<scr"+"ipt type=text/javascript src=menu_data_main.js><\/scr"+"ipt>");
else
_d.write("<scr"+"ipt type=text/javascript src=menu_data_safari_main.js><\/scr"+"ipt>");
</script>


Raju.


Poster: Ruth
Dated: Tuesday January 31 2006 - 19:30:22 GMT

Hi,

Thanks so much for posting the solution, a great help to others who might want this.

Ruth