Solved

Netscape issues

Posted on 2001-07-03
24
181 Views
Last Modified: 2006-11-17
Having some issues running my nav bar in Netscape, would appreciate any help you can give.

http://www.sterlinginsurancegroup.com/test.html

Regards,

Matt.
0
Comment
Question by:Matt_Unsworth
  • 12
  • 11
24 Comments
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Your code is incomplete....

You haven't got a closing:

</body>
</html>

I would also get rid of the <div align="center"> near the top of the script and the </div> further down - you can centre things in other ways - I think Netscape may have a problem with that and the layers.

Also (I'm not 100% sure on this) Netscape has a real problem with nested tables and layers - you are going to have to avoid them....
:o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Your right......

If I execute the nav bar code on its own it runs in IE and Netscape.

So I suppose I need to change the page setup itself, not the nav bar......

Any suggestions,

Matt
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Yes - I've already mentioned them above!

For starters try and have it so you are not using all the nested tables - at least not where the layers are concerned.

Ant
0
 
LVL 19

Expert Comment

by:webwoman
Comment Utility
Put things in the right places...

Move the script and style into the HEAD tags, out of the div and table.
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Struggling to get this to work.

Would really love help with an answer.

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Upload the changes you have made to the link you gave above so that we can see where you are currently at with it........

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Changes I've made at the following url:

http://www.sterlinginsurancegroup.com/test3.html

It works in IE and sort of works in Netscape......

Cheers,

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
mmm.....would you be willing to perhaps make use of an alternative script that I know works in Netscape well?


:o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Of course, if it more or less emulates the look and feel of mine.

Matt
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Well they may not be identical, but you can certainly customise them.

Here are two good ones:

http://www.simplythebest.net/info/dhtmscript42.html

http://www.simplythebest.net/info/dhtmscript52.html


And if they're not quite what you want take a look at some of the others:

http://www.simplythebest.net/info/dhtml_menus.html


:o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Ok, used one of the scripts you suggested, and it works fine in both IE and Navigator.

My basic page set up is as follows:
<html>
<head>
<title>test</title>
</head>
<body bgcolor="#003399" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr bgcolor="#0099ff">
<td bgcolor ="#0099ff"><img src="images/spacer.gif" border="0" width="100" height="28"></td>
</tr>
</table>
</body>
</html>

You can see an example at: http://www.sterlinginsurancegroup.com/template

How do I merge the new nav bar code into the above, you can see an example of the nav bar at: http://www.sterlinginsurancegroup.com/navbartest.html

Cheers,

Matt.



0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Correction, you can see the above example at

http://www.sterlingisnurancegroup.com/template1.html

Regards,

Matt.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 15

Accepted Solution

by:
a.marsh earned 200 total points
Comment Utility
Here you go!

<html>
<head>
<base href="http://www.sterlinginsurancegroup.com/">
<title>testing_main</title>
<script language="JavaScript" src="http://www.sterlinginsurancegroup.com/dscript42/dhtmllib.js"></script>
<script language="JavaScript" src="http://www.sterlinginsurancegroup.com/dscript42/navbar.js"></script>
<script language="JavaScript">
var myNavBar = new NavBar(800);
var tempMenu;
myNavBar.setColors("#0099ff", "#ffffff", "#0099ff", "#ffffff", "#0099ff", "#ffffff", "#0099ff", "#ffffff", "#003399");
myNavBar.setAlign("center");
tempMenu = new NavBarMenu(0, 0);
tempMenu.addItem(new NavBarMenuItem("Home", "http://www.sterlinginsurancegroup.com/index_main.html"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 120);
tempMenu.addItem(new NavBarMenuItem("Latest News"));
tempMenu.addItem(new NavBarMenuItem("Press releases", "http://www.sterlinginsurancegroup.com/press_release.html"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 120);
tempMenu.addItem(new NavBarMenuItem("About us"));
tempMenu.addItem(new NavBarMenuItem("Sterling History", "http://www.sterlinginsurancegroup.com/history.html"));
tempMenu.addItem(new NavBarMenuItem("Links", "http://www.sterlinginsurancegroup.com/links.html"));
tempMenu.addItem(new NavBarMenuItem("Directions", "http://www.sterlinginsurancegroup.com/locations.html"));
tempMenu.addItem(new NavBarMenuItem("Disclaimer", "http://www.sterlinginsurancegroup.com/disclaimer.html"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 0);
tempMenu.addItem(new NavBarMenuItem("Product Range"));
tempMenu.addItem(new NavBarMenuItem("Products", "http://www.sterlinginsurancegroup.com/product_range.html"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 0);
tempMenu.addItem(new NavBarMenuItem("Marketing & Services"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 120);
tempMenu.addItem(new NavBarMenuItem("Financials"));
tempMenu.addItem(new NavBarMenuItem("Key Indiators", "http://www.sterlinginsurancegroup.com/financial_results.html"));
myNavBar.addMenu(tempMenu);
tempMenu = new NavBarMenu(0, 0);
tempMenu.addItem(new NavBarMenuItem("Contact us"));
tempMenu.addItem(new NavBarMenuItem("Email", "http://www.sterlinginsurancegroup.com/contactus.html"));
myNavBar.addMenu(tempMenu);
function init() {

  var img;
  myNavBar.create();
  // Find the position of the embedded image and move bar accordingly
  img = getImage("placeholder");
  myNavBar.moveTo(getImagePageLeft(img) - 2, getImagePageTop(img) - 2);
}
</script>
</head>

<body onload="init()" bgcolor="#003399" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr bgcolor="#0099ff">
 <td bgcolor ="#0099ff"><img src="images/spacer.gif" border="0" width="100" height="28"><img name="placeholder" border=0 src="dscript42/transparent.gif" width=1 height=22></td>
</tr>
</table>
</body>
</html>


You don't need the references to "www.sterlinginsurancegroup.com" - I've just put them in there so I can get the page working on my local machine.

:o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
I've just got one final issue. In netscape the nav bar is fully operational however the font type, size and color which I have set (and are displayed in IE), are not displayed in Netscape.

It appears to display a some sort of default font, it looks like Times New Roman, black, size 10/12.

Any ideas how I can fix this.

Check out the navbar at:

http://www.sterlinginsurancegroup.com/navtest4.html

And the supporting files:

http://www.sterlinginsurancegroup.com/dscript42/navbar.js
http://www.sterlinginsurancegroup.com/dscript42/dhtmllib.js

Cheers,
Matt.

 
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
If you look through the navbar.js file you will see a function to change the fonts.

navBarSetFonts(hdrFamily, hdrStyle, hdrWeight, hdrSize, itmFamily, itmStyle, itmWeight, itmSize)

Here is an example of how to use it:

navBarSetFonts("Helvetica", "normal", "bold", "14pt", "Helvetica", "normal", "normal", "12pt")

You can call it after calling the navBarSetColors() function.

Don't forget that Netscape can only show fonts it knows about!

:o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Made the changes you suggested, however it had no effect on the fonts in Netscape.

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Without trying to sound patronising - are you definitely referring to fonts that will work in Netscape?

A way to test this is to setup a very basic page that uses the fonts and see if it works as it should e.g.

<html>
<head>
</head>
<body>
<p style="font-family: fontname">the font you specified</p>
<p>normal font</p>
</body>
</html>

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
The fonts I'm using are valid in Netscape, and they work in your enclosed test app.

Any suggestions....

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
It could be that Netscape has an issue with them when used in layers - the other thing you could try is actually changing the navbar.js file - in there you will find the default fonts specified.

And, of course, don't bother to use the navBarSetFonts() function.

Other than that, you've now got a fully working solution haven't you? :o)

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Here's the thing I already changed the default fonts, but I've just noticed something a bit odd.

I can change the fonts in navbar.js to several different font types (I've just tried this as a test), and when you look a the file in IE the fonts have not changed. Likewise when you look at the navbar in netscape it always appears in Times New Roman....

It's seems that the changes I'm making are not being picked up.

Did your test work?

Matt.

0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Forget the fonts issue for now.

Just checking some of my files this morning that are on the web and the java nav bar is not working at all.

I've made no changes for a few days, any suggestions as to the source of the problem.

http://www.sterlinginsurancegroup.com/index1.html

Suppoerting files are:

http://www.sterlinginsurancegroup.com/dscript42/navbar.js
http://www.sterlinginsurancegroup.com/dscript42/dhtmllib.js

Cheers,
Matt.

0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Something must have changed - there are a number of javascript errors appearing now.

If it was working fine, it would not suddenly stop working unless SOMETHING has been changed.....

:o\

Ant
0
 

Author Comment

by:Matt_Unsworth
Comment Utility
Ant,

Thanks very much for your help, it was absolutely superb,

Best regards,

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
Comment Utility
Glad to help. :o)

I gather you resolved the error issue then?

:o)

Ant
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now