473,739 Members | 6,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>PianetaL uca</TITLE>
</HEAD>
<SCRIPT Language="Javas cript">
document.writel n('<script type="text/javascript"
src="/contatore.js">< '+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0"
rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no"
frameborder="no " border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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 2329
> I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaL uca</TITLE>
</HEAD>
<SCRIPT Language="Javas cript">
document.writel n('<script type="text/javascript"
src="/contatore.js">< '+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0"
rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no"
frameborder="no " border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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>PianetaL uca</TITLE>
</HEAD>
<FRAMESET frameborder="0" border="0" rows="100,*">
<FRAME src="menu.html" scrolling="no" frameborder="no " border="0" name="menu_fram e">
<FRAME src="benven.htm l" 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>PianetaL uca</TITLE>
</HEAD>
<SCRIPT Language="Javas cript">
document.writel n('<script type="text/javascript"
src="/contatore.js">< '+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0"
rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no"
frameborder="no " border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 2 '06 #3
On 2006-05-02, lm********@gmai l.com <lm********@gma il.com> wrote:
Hi,
I have this website that doesn't work in Firefox 1.5:

www.pianetaluca.com

The HTML source is:
<TITLE>PianetaL uca</TITLE>
</HEAD>
<SCRIPT Language="Javas cript">
document.writel n('<script type="text/javascript"
src="/contatore.js">< '+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0"
rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no"
frameborder="no " border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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.write ln('<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="spagno lo,corso,lingua ,tedesco,svedes e,
pronuncia,spagn ola,grammatica, traduzione,trad uzioni,luca,Luc a,marceglia,Mar ceglia,Luca
Marceglia,luca marceglia,
programmi,progr amma,amiga,Amig a,programmi
amiga,bici,viag gi,Londra,Peru, Finlandia
programs,progra m,amiga programs,italia n
grammar,italian ,grammar,gramat ica,italiana,gr amatica
italiana,Vigo,v igo,erasmus,era smus vigo,socrates,s ocrates vigo,catalano">
<meta name="Descripti on" 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.i co"><title>Pian etaLuca</title>
<script language="Javas cript">
document.writel n('<script type="text/javascript"
src="contatore. js"><'+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0" rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no" frameborder="no "
border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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="spagno lo,corso,lingua ,tedesco,svedes e,
pronuncia,spagn ola,grammatica, traduzione,trad uzioni,luca,Luc a,marceglia,Mar ceglia,Luca
Marceglia,luca marceglia,
programmi,progr amma,amiga,Amig a,programmi
amiga,bici,viag gi,Londra,Peru, Finlandia
programs,progra m,amiga programs,italia n
grammar,italian ,grammar,gramat ica,italiana,gr amatica
italiana,Vigo,v igo,erasmus,era smus vigo,socrates,s ocrates vigo,catalano">
<meta name="Descripti on" 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.i co"><title>Pian etaLuca</title>
<script language="Javas cript">
document.writel n('<FRAMESET frameborder="0" border="0" rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no" frameborder="no "
border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</FRAMESET>');
document.writel n('<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_fram e"
scrolling="no">
<frame src="benven.htm l" 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>"+st r1+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="spagno lo,corso,lingua ,tedesco,svedes e,
pronuncia,spagn ola,grammatica, traduzione,trad uzioni,luca,Luc a,marceglia,Mar ceglia,Luca
Marceglia,luca marceglia,
programmi,progr amma,amiga,Amig a,programmi
amiga,bici,viag gi,Londra,Peru, Finlandia
programs,progra m,amiga programs,italia n
grammar,italian ,grammar,gramat ica,italiana,gr amatica
italiana,Vigo,v igo,erasmus,era smus vigo,socrates,s ocrates vigo,catalano">
<meta name="Descripti on" 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.i co"><title>Pian etaLuca</title>
<script language="Javas cript">
document.writel n('<script type="text/javascript"
src="contatore. js"><'+'\/script>');
document.writel n('<FRAMESET frameborder="0" border="0" rows="100,*">') ;
document.writel n('<FRAME src="menu.html" scrolling="no" frameborder="no "
border="0" name="menu_fram e">');
document.writel n('<FRAME src="benven.htm l" name="mainframe ">');
document.writel n('</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><frame set
frameborder="0" border="0" rows="100,*">
<frame src="menu.html" frameborder="no " border="0" name="menu_fram e"
scrolling="no">
<frame src="benven.htm l" 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
1945
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 (in)validate my Javascript code. First, I'll describe the purpose of the Javascript code. I often have a need to post a URL to something at my own web site, e.g., http://www.standards.com/Sorting/SortPerformanceComparison-Description.html. It is...
5
2217
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 in IE, though. I know, IE is a bit more permissive than IE, and sometimes lets errors work when they shouldn't. But from what I can see, I just don't see what's wrong.
13
8310
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 typing javascript: (remember the colon) in the Location box. Navigator displays a "JavaScript typein" frame at the bottom of the window. Type the command line you want to try, and press Enter. "
8
3674
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
7
9612
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 language="JavaScript"> var cntlName; var eleTarget = document.getElementById('hiding'); function showOrHide(){
11
3431
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 no buttons react to clicking. The website's helpdesk says it should work with Firefox, and could not offer any more advices. The JavaScript Console shows that there are numerous errors occuring. It looks like the web browser does not recognise...
8
1928
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 the way it handles JavaScript, two hackers said Saturday afternoon. An attacker could commandeer a computer running the browser simply by crafting a Web page that contains some malicious JavaScript code, Mischa Spiegelmock and Andrew Wbeelsoi...
16
2333
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 on the same page work correctly. It appears to be isolated to 1-2 machines in a particular network. I cannot verify whether these machines have had virus/spyware scans, but I do know the user is running Firefox 2.1 and IE 7 with the same...
12
2613
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 than one line and the text simply overlaps the sub-menus below it. I thought i had got around this by placing empty 'spacers' like so; oFoldMenu.make('sub3','')//spacer unfortunately, i have just viewed the site in IExplorer and it has added...
0
9483
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9341
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9269
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9211
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6056
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4572
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.