473,388 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Javascript and Firefox 1.5

Hi,
I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaLuca</TITLE>
</HEAD>
<SCRIPT Language="Javascript">
document.writeln('<script type="text/javascript"
src="/contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0"
rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no"
frameborder="no" border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script>
</HTML>

With IE everything works fine. But why have I got problems with Firefox
1.5 (and not with the previous versions, say 1.0.3)? Is my javascript
code which is not good?

Thanks a lot for your help.
Luc.

May 2 '06 #1
4 2297
> I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaLuca</TITLE>
</HEAD>
<SCRIPT Language="Javascript">
document.writeln('<script type="text/javascript"
src="/contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0"
rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no"
frameborder="no" border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script>
</HTML>

With IE everything works fine. But why have I got problems with Firefox
1.5 (and not with the previous versions, say 1.0.3)? Is my javascript
code which is not good?


why use js like this ? are you hiding it for google ?
I recomend using AJAX to do so, why not write it the
normal way, like:

<TITLE>PianetaLuca</TITLE>
</HEAD>
<FRAMESET frameborder="0" border="0" rows="100,*">
<FRAME src="menu.html" scrolling="no" frameborder="no" border="0" name="menu_frame">
<FRAME src="benven.html" name="mainframe">
</FRAMESET>
</HTML>

arnulf @ http://rlb.no/my/
May 2 '06 #2
Arnulf Sortland said the following on 5/2/2006 5:53 PM:
I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaLuca</TITLE>
</HEAD>
<SCRIPT Language="Javascript">
document.writeln('<script type="text/javascript"
src="/contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0"
rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no"
frameborder="no" border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script>
</HTML>

With IE everything works fine. But why have I got problems with Firefox
1.5 (and not with the previous versions, say 1.0.3)? Is my javascript
code which is not good?
why use js like this ? are you hiding it for google ?


Good question and maybe.
I recomend using AJAX to do so


Why? There are better ways. One that you included yourself.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 2 '06 #3
On 2006-05-02, lm********@gmail.com <lm********@gmail.com> wrote:
Hi,
I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaLuca</TITLE>
</HEAD>
<SCRIPT Language="Javascript">
document.writeln('<script type="text/javascript"
src="/contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0"
rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no"
frameborder="no" border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script>
</HTML>

With IE everything works fine. But why have I got problems with Firefox
1.5 (and not with the previous versions, say 1.0.3)? Is my javascript
code which is not good?


The Javascript is fine. The HTML is junk. I guess that's why it
"works" in IE (and earlier versions of Firefox).

Firefox no longer allows HTML as bad as the page would create.
Is it a frameset or does it have a body? If you can't make up
your mind, firefox just has to guess. Depending upon where the
line that loads the contatore.js appears, it will either assume
it has a body (as you have it now - and so it disallows framesets)
or framesets (and you don't get anything written by contatore.js).
It is a frameset or does the document have a body?
The contatore.js does a document.write to the body.
THe original code claims it is a frameset.

You can have one or the other (some browsers may actually put in a body
with frameset, but ... it ain't right).

The way you have it set up, you get the body (ALL you get is the code
written by contatore.js) (that inclusion appears before the frameset
and so it loads the contatore.js which does a document.write, forcing
a body and so the [frameset] is then illegal).

If you move the 'document.writeln('<script type="text/javascript"' to
the end of the script section, then you get the frameset material first
(but then contatore.js's document.write is illegal and that is missing).

Try using a tool which shows the code after the browser loads the page and
interprets and renders it, itself. Getting a copy of your contatore.js (and
changing the code in the first part so it does not refer to the root, i.e.
it is src="contatore.js" instead of src="/contatore.js") here is what the
original gives as what the browser rendered:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="spagnolo,corso,lingua,tedesco,svedese,
pronuncia,spagnola,grammatica,traduzione,traduzion i,luca,Luca,marceglia,Marceglia,Luca
Marceglia,luca marceglia,
programmi,programma,amiga,Amiga,programmi
amiga,bici,viaggi,Londra,Peru,Finlandia
programs,program,amiga programs,italian
grammar,italian,grammar,gramatica,italiana,gramati ca
italiana,Vigo,vigo,erasmus,erasmus vigo,socrates,socrates vigo,catalano">
<meta name="Description" content="Questa pagina contiene una grammatica di
spagnolo, descrive la citta' di Vigo per gli studenti Erasmus e mostra i
possibili giri in bicicletta nel bellunese. English available. Versisn en
espaqol.">
<link rel="shortcut icon" href="favicon.ico"><title>PianetaLuca</title>
<script language="Javascript">
document.writeln('<script type="text/javascript"
src="contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0" rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no" frameborder="no"
border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script><script type="text/javascript"
src="contatore.js"></script></head><body><a
href="http://www.pianetaluca.com"><img src="/counter/spacer.gif"
name="fixitlink" alt="htmlfixit counter" title="Counter provided by
htmlfixit.com" border="0" height="2" width="1"></a>
Above, you have the body (from contatore.js) and no frameset.
Now, instead, move the first line of the script on the starting page
to the end (so the frameset appears before the load of the contatore.js
script). Then one has:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="spagnolo,corso,lingua,tedesco,svedese,
pronuncia,spagnola,grammatica,traduzione,traduzion i,luca,Luca,marceglia,Marceglia,Luca
Marceglia,luca marceglia,
programmi,programma,amiga,Amiga,programmi
amiga,bici,viaggi,Londra,Peru,Finlandia
programs,program,amiga programs,italian
grammar,italian,grammar,gramatica,italiana,gramati ca
italiana,Vigo,vigo,erasmus,erasmus vigo,socrates,socrates vigo,catalano">
<meta name="Description" content="Questa pagina contiene una grammatica di
spagnolo, descrive la citta' di Vigo per gli studenti Erasmus e mostra i
possibili giri in bicicletta nel bellunese. English available. Versisn en
espaqol.">
<link rel="shortcut icon" href="favicon.ico"><title>PianetaLuca</title>
<script language="Javascript">
document.writeln('<FRAMESET frameborder="0" border="0" rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no" frameborder="no"
border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
document.writeln('<script type="text/javascript"
src="contatore.js"><'+'\/script>');
</script><script type="text/javascript"
src="contatore.js"></script></head><frameset frameborder="0" border="0"
rows="100,*">
<frame src="menu.html" frameborder="no" border="0" name="menu_frame"
scrolling="no">
<frame src="benven.html" name="mainframe">
</frameset>
Now you have the frameset, but miss out on the stuff written by
contatore.js's document.write (this is a frameset and so has no
body to write to).
Now try changing the document.write in contatore.js to
document.write("<noframes>"+str1+str2+str3+"</noframes>");
and go back to the original order of the lines and get:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="spagnolo,corso,lingua,tedesco,svedese,
pronuncia,spagnola,grammatica,traduzione,traduzion i,luca,Luca,marceglia,Marceglia,Luca
Marceglia,luca marceglia,
programmi,programma,amiga,Amiga,programmi
amiga,bici,viaggi,Londra,Peru,Finlandia
programs,program,amiga programs,italian
grammar,italian,grammar,gramatica,italiana,gramati ca
italiana,Vigo,vigo,erasmus,erasmus vigo,socrates,socrates vigo,catalano">
<meta name="Description" content="Questa pagina contiene una grammatica di
spagnolo, descrive la citta' di Vigo per gli studenti Erasmus e mostra i
possibili giri in bicicletta nel bellunese. English available. Versisn en
espaqol.">
<link rel="shortcut icon" href="favicon.ico"><title>PianetaLuca</title>
<script language="Javascript">
document.writeln('<script type="text/javascript"
src="contatore.js"><'+'\/script>');
document.writeln('<FRAMESET frameborder="0" border="0" rows="100,*">');
document.writeln('<FRAME src="menu.html" scrolling="no" frameborder="no"
border="0" name="menu_frame">');
document.writeln('<FRAME src="benven.html" name="mainframe">');
document.writeln('</FRAMESET>');
</script><script type="text/javascript"
src="contatore.js"></script></head><noframes><a
href='http://www.pianetaluca.com'><img src="/counter/spacer.gif" border='0'
width='1px' height='2px' name='fixitlink'alt='htmlfixit counter'
title='Counter provided by htmlfixit.com' /></a></noframes><frameset
frameborder="0" border="0" rows="100,*">
<frame src="menu.html" frameborder="no" border="0" name="menu_frame"
scrolling="no">
<frame src="benven.html" name="mainframe">
</frameset>
BINGO! Got it all.

You can write the contatore.js material to the page, but only in a noframes
section if you want the frameset or put in another frame for its contents
from a separate page.
May 3 '06 #4
Your message is crisp and clear. Thanks a lot for all the info you've
given me.
Now I fully understand why the code wasn't loaded.
I learnt a lor from your post! Thank you so much! Now the page is
working.

You do know HTML!!!

May 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Howard Kaikow | last post by:
Yesterday, I decided to try Firefox. I've encountered a behavior that is either a bug in Firefox or a bug in my Javascript code. I'll try to explain the problem, hoping that this newsgroup can...
5
by: LRW | last post by:
(Sorry if this is a repost...my newsreader keeps crashing on the posting--I don't know if the message going out or not) For some reason this javascript just won't work in Firefox. It works fine...
13
by: John Smith | last post by:
I am using IE 6.0 from http://www.javaworld.com/javaworld/jw-07-1996/jw-07-javascript-p2.html I gather that "If you need to test a number of command lines, you can reduce the keystrokes by...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
11
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and...
8
by: Matt Kruse | last post by:
http://news.zdnet.com/2100-1009_22-6121608.html Hackers claim zero-day flaw in Firefox 09 / 30 / 06 | By Joris Evers SAN DIEGO--The open-source Firefox Web browser is critically flawed in...
16
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.