472,959 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,959 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 2280
> 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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.