Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Netscape issues

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
Matt_Unsworth
Asked:
Matt_Unsworth
  • 12
  • 11
1 Solution
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
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
 
a.marshCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
webwomanCommented:
Put things in the right places...

Move the script and style into the HEAD tags, out of the div and table.
0
 
Matt_UnsworthAuthor Commented:
Struggling to get this to work.

Would really love help with an answer.

Matt.
0
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
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
 
a.marshCommented:
mmm.....would you be willing to perhaps make use of an alternative script that I know works in Netscape well?


:o)

Ant
0
 
Matt_UnsworthAuthor Commented:
Of course, if it more or less emulates the look and feel of mine.

Matt
0
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
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
 
Matt_UnsworthAuthor Commented:
Correction, you can see the above example at

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

Regards,

Matt.
0
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
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
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
Made the changes you suggested, however it had no effect on the fonts in Netscape.

Matt.
0
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
The fonts I'm using are valid in Netscape, and they work in your enclosed test app.

Any suggestions....

Matt.
0
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
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
 
Matt_UnsworthAuthor Commented:
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
 
a.marshCommented:
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
 
Matt_UnsworthAuthor Commented:
Ant,

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

Best regards,

Matt.
0
 
a.marshCommented:
Glad to help. :o)

I gather you resolved the error issue then?

:o)

Ant
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 12
  • 11
Tackle projects and never again get stuck behind a technical roadblock.
Join Now