Solved

Netscape issues

Posted on 2001-07-03
24
187 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
ID: 6248323
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
ID: 6248522
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
ID: 6248530
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 19

Expert Comment

by:webwoman
ID: 6248598
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
ID: 6251806
Struggling to get this to work.

Would really love help with an answer.

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6251836
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
ID: 6251899
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
ID: 6252032
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
ID: 6252054
Of course, if it more or less emulates the look and feel of mine.

Matt
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6252067
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
ID: 6252746
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
ID: 6252749
Correction, you can see the above example at

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

Regards,

Matt.
0
 
LVL 15

Accepted Solution

by:
a.marsh earned 200 total points
ID: 6252788
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
ID: 6254989
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
ID: 6255130
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
ID: 6255494
Made the changes you suggested, however it had no effect on the fonts in Netscape.

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6255615
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
ID: 6259081
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
ID: 6259100
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
ID: 6259179
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
ID: 6264247
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
ID: 6264264
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
ID: 6265837
Ant,

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

Best regards,

Matt.
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6266928
Glad to help. :o)

I gather you resolved the error issue then?

:o)

Ant
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to avoid redundand ajax calls 5 28
Javasctipt 2 24
how i fix Remove render-blocking JavaScript 3 52
Checking data with javascript 3 19
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 …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

785 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