The bugs i have collected at this day

  1. Tables and JavaScripts in Netscape 3
  2. Frames and function open.window()
  3. Use of the function history.back()
  4. Netscape and the forms alignment
  5. Netscape 3 and parent property
  6. Tag onunload with NE 4 (and others!)

 

 

Tables and JavaScripts in Netscape 3

These are a few lines giving some onformations on the browser use

Name of your browser :
<SCRIPT language="JavaScript">
document.write(navigator.appName)
</SCRIPT>
<BR>
Version :
<SCRIPT language="JavaScript">
document.write(navigator.appVersion)
</SCRIPT>

First case in a table : it's run well

Name of your browser :
Version :

Second case with nested tables : the previous table is nested in the first cell of an other

Name of your browser :
Version :
That's don't run with NETSCAPE 3

I spent lot of working time to understand wht. So be careful with nested tables in NETSCAPE 3. I guess that this bug is the same in other cases.

Frames and function open.window()

A cool litle function opening a page in a new browser's window with the attributes and size you chose.

function ouvre_fenetre() {
window.open('sites.htm','sites','width=500,height=300,scrollbars=yes');
}

Let's try to use this function.

Links Javascript <a href="javascript:ouvre_fenetre()">Links Javascript</a>

<form>
<p align="center"><input type="button" value=" Links javascript "
onclick="ouvre_fenetre()"> </p>
</form>
<a href="javascript:ouvre_fenetre()">
<img src="links.gif" align="absmiddle"
border="0" width="180" height="92"></a>

You can see that the text link don't run and make an error of the JAVA engine. In fact i have make this page so that it's make an erreur, but this is always the default if the links were in the 'sommaire' frame.

Explanations :

- This frame is the frame 'principal'
- The left frame is the frame 'sommaire'
- I wrote those pages in good HTML an the HEAD section of the page sommaire include the TAG : <,base target="principalaquot;>
- I modify the page 'principal' by inserting a tag <base target="sommaire"> the browser look for the javascript in the page sommaire where it does not exist.

2 Solutions :

- delete the tag <base target="xxxx"> (in this case you must inser the tag target) after each href tag)
- insert after <a href="javascript:xxxx", target="frame in wich the script is writen">

First solution is the best, some browsers seems to be inprevoyable with the second one.

Use of the function history.back()

A cool function wich make the browser go to the previous page (note that history.go(-1) do the same)

<form>
<center>
<p align="center"><input type="button" value=" Back "
onclick="history.back()"> </p>
</center>
</form>

This one run well, but try the one on the 'sommaire' page in the left frame, click it many times, at first it's run well, but when you should leave the frames for the first page (with the french and english flags), here what's appen :

 

Netscape and forms alignment

Try with a very simple form like the previous one for example and let's write it with 3 diferent ways :

The logic one

<form>
<p align="center"><input type="button"
value=" Back "
onclick="history.back()"> </p>
</form>
Another way

<form>
<center>
<p><input type="button" value=" Back "
onclick="history.back()"> </p>
</center>
</form>
Redundancy

<form>
<center>
<p align="center"><input type="button" value=
" Back "
onclick="history.back()"> </p>
</center>
</form>

With NETSCAPE, in the first case, the button is not center. The second case center because it is in a table with the tag <div align=center> otherwise it's not center. Only the third case is good.

IE is good in each case.

This bug (HTML) is very ugly because most of composer softwares (for example FRONTPAGE), automaticly delete the HTML code redundancies. So you have to correct them back after each use of such a software. Grrrrrrr........

Netscape 3 an parent property

Michael B. submit me a bug of netscape 3 whith some pages, this is what i discover :
Warning netscape 3 users, the sample will crash your computer !

This is a sample to demonstrate the bug :

ebug5.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>bug5</title>
</head>
<script language="Javascript">
var nb=0;
function test_bug() {
var doc = top.haut.window;
doc.document.write('<A HREF="javascript:parent.test_bug()">click me</A>');
nb = nb+1;
doc.document.write('<p>number of click : ');
doc.document.write(nb.toString());
doc.document.write('</p>');
doc.document.close();
}
</script>
<frameset rows="50%,50%">
<frame src="bug5h.htm" name="haut" marginwidth="1" marginheight="1">
<frame src="bug5b.htm" name="bas" marginwidth="1" marginheight="1">
</frameset>
</html>

bug5h.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>Cadre haut</title>
</head>
<body>
<A HREF="javascript:test_bug()" base target="java">click me</A>
</body>
</html>

bug5b.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>Cadre bas</title>
</head>
<body>
<A HREF="javascript:test_bug()" base target="java">click me</A>
<p>This page run well with NETSCAPE 3.
</p>
</body>
</html>

Test it

It seems that netscape 3 has a big stack problem ! surprising no ?

Here is the solution : put the javascript code in a hiden third frame. There is the code :

esol5.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>bug5</title>
</head>
<frameset cols="0,100%" border="0">
<frame src="jv.htm" name="java">
<frameset rows="50%,50%">
<frame src="sol5h.htm" name="haut" marginwidth="1" marginheight="1">
<frame src="sol5b.htm" name="bas" marginwidth="1" marginheight="1">
</frameset>
</frameset>
</html>

sol5h.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>Cadre haut</title>
</head>
<body>
<A HREF="javascript:test_bug()" base target="java">click me</A>
</body>
</html>

sol5b.htm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>Cadre bas</title>
</head>
<body>
<A HREF="javascript:test_bug()" base target="java">click me</A>
<p>This page run well with NETSCAPE 3.</p>
</body>
</html>

jv.htm

<script language="Javascript">
var nb=0;
function test_bug() {
var doc = top.haut.window;
doc.document.write('<A HREF="javascript:test_bug()" base target="java">click me</A>');
nb = nb+1;
doc.document.write('<p>number of click : ');
doc.document.write(nb.toString());
doc.document.write('</p>');
doc.document.close();
}
</script>

Test the solution

Tag onunload with NE 4 (and others!)

Unfortunatly, i found a 'bug' common with few browsers. I wanted to open a new window while an other was unloaded. To do that i use the tag 'unload', either after 'body', or after 'frameset', résults are surprising.

And what about MAC versions ?