473,769 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mozilla Firefox compatibility problem

I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

CenterIt and mouseCheck are my own javascript functions. Works fine for IE
and Opera, doesn't even go into the function for Firefox or Netscape. Is
there a different way to assign functions to events that will be understood
by "all" browsers? Thanks!
Jul 23 '05 #1
36 3567
Simon Wigzell wrote:
I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

Is there a different way to assign functions to events that
will be understood by "all" browsers? Thanks!


Try writing formally valid HTML.

Richard.
Jul 23 '05 #2
Oh thank you so much! You are so kind and so helpfull! Now I know how what I
did wrong! Now I can solve my problem! You are so wonderfull!

Can I send you some money as a reward for your deep insight and wisdom?

"Richard Cornford" <Ri*****@litote s.demon.co.uk> wrote in message
news:da******** ***********@new s.demon.co.uk.. .
Simon Wigzell wrote:
I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

Is there a different way to assign functions to events that
will be understood by "all" browsers? Thanks!


Try writing formally valid HTML.

Richard.

Jul 23 '05 #3
"Simon Wigzell" <si**********@s haw.ca> wrote:
I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

CenterIt and mouseCheck are my own javascript functions. Works fine for IE
and Opera, doesn't even go into the function for Firefox or Netscape. Is
there a different way to assign functions to events that will be understood
by "all" browsers? Thanks!


IMHO your HTML syntax is wrong and I'm rather surprised that IE
understands it. Try:

<body onresize="Cente rIt();" onmousemove="mo useCheck(event) ;">

--
Tim Slattery
Sl********@bls. gov
Jul 23 '05 #4
Simon Wigzell wrote:
<top-posting fixed>
Richard Cornford wrote:
Simon Wigzell wrote:
I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

Is there a different way to assign functions to events that
will be understood by "all" browsers? Thanks!
Try writing formally valid HTML.

Oh thank you so much! You are so kind and so helpfull!
Now I know how what I did wrong! Now I can solve my
problem! You are so wonderfull!

<snip>

If you validated your HTML the validator would tell you what was wrong
with it and you wouldn't have to ask.

Richard.


Jul 23 '05 #5
Tim Slattery wrote :
"Simon Wigzell" <si**********@s haw.ca> wrote:

I have the following in my webpage:

<body onresize=Center It(); onMouseMove=mou seCheck(event); >

CenterIt and mouseCheck are my own javascript functions. Works fine for IE
and Opera, doesn't even go into the function for Firefox or Netscape. Is
there a different way to assign functions to events that will be understood
by "all" browsers? Thanks!

IMHO your HTML syntax is wrong and I'm rather surprised that IE
understands it. Try:

<body onresize="Cente rIt();" onmousemove="mo useCheck(event) ;">

--
Tim Slattery
Sl********@bls. gov


There is no onresize event handler for the body element in HTML 4.01: so
that too is invalid.
The window.event property is MSIE-specific. MSIE does not support DOM 2
Events interface. So both Firefox and Netscape should reply in their
javascript console that "event is an undefined object".

Gérard
--
remove blah to email me
Jul 23 '05 #6
Simon Wigzell wrote :
Oh thank you so much! You are so kind and so helpfull! Now I know how what I
did wrong! Now I can solve my problem! You are so wonderfull!

Can I send you some money as a reward for your deep insight and wisdom?


You may find Richard's answer irritating and frustrating but I assure
you that the very first thing to do when facing a layout or error or a
problem of some sort is to make sure that the markup code is well-formed
and valid and that the CSS code is valid and does not generate parsing
errors. Often, the source of problems is there or starts there.

So:
- onresize is not a valid attribute for body element; you would possibly
want the resize event to be registered on the window object instead
- event is a proprietary object in MSIE 5+
- MSIE 6 does not support DOM 2 Events attributes and methods

Crossbrowser DOM Scripting: Event Handlers
http://www.scottandrew.com/weblog/articles/cbs-events

There you go.

Gérard
--
remove blah to email me
Jul 23 '05 #7
On Fri, 08 Jul 2005 03:32:00 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:
Tim Slattery wrote :
IMHO your HTML syntax is wrong and I'm rather surprised that IE
understands it. Try:

<body onresize="Cente rIt();" onmousemove="mo useCheck(event) ;">


There is no onresize event handler for the body element in HTML 4.01: so
that too is invalid.


You've not got enough information to say that, he may be using a
doctype, or internal subset with an onresize attribute for body. The
brackets problems are not solvable in a document you can serve as
text/html.

Jim.
Jul 23 '05 #8
Jim Ley wrote :
On Fri, 08 Jul 2005 03:32:00 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:

Tim Slattery wrote :
IMHO your HTML syntax is wrong and I'm rather surprised that IE
understand s it. Try:

<body onresize="Cente rIt();" onmousemove="mo useCheck(event) ;">
There is no onresize event handler for the body element in HTML 4.01: so
that too is invalid.

You've not got enough information to say that, he may be using a
doctype, or internal subset with an onresize attribute for body.


Well, I was referring to HTML 4.01. And I always assume that (a standard
doctype) as default when someone post.
If I remember correctly, in such case (internal error correction
mechanism), Mozilla-based browsers and MSIE assign the resize event to
the window object by default.
I wanted to point out the invalid attribute.

The brackets problems are not solvable in a document you can serve as
text/html.

Jim.


I don't understand that last part: what brackets problems? You mean
missing quote " signs?.. ok then :) Yes, missing the quotes is decisive.

Cheers,

Gérard
--
remove blah to email me
Jul 23 '05 #9
On Fri, 08 Jul 2005 05:51:48 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:
Jim Ley wrote :
You've not got enough information to say that, he may be using a
doctype, or internal subset with an onresize attribute for body.
Well, I was referring to HTML 4.01. And I always assume that (a standard
doctype) as default when someone post.


You can't do that however, especially as the W3 standard doctypes are
not the only ones that user agents support, particularly onresize on
body which is supported by the majority of user agents.
If I remember correctly, in such case (internal error correction
mechanism), Mozilla-based browsers and MSIE assign the resize event to
the window object by default.


This is not "internal error correction" it's the documented behaviour
for the user agents.

Jim.
Jul 23 '05 #10

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

Similar topics

4
3040
by: M.D. | last post by:
Hi, I am having a problem with my program which only happens when using Mozilla or Firefox. The pages I wrote, are part of a private web directory, a service offered by the ISP, which upon configuration, restricts its access only to users registered on the site. So then once the user signs in, the entry point of the user to my pages, has access to a cookie (site_<some number>) set by the validation program. I can use the values in this...
13
3098
by: dave | last post by:
where is there a source which shows which css standard, and how much of that standard, is implemented in firefox's (1.0) engine? t.i.a.
2
5712
by: anna | last post by:
Firefox Mozilla Browser Fonts / Format / rich text / webmail question I have Comcast. They do not support Firefox so they won't help me. When I use Mozilla firefox browser to access my web mail like comcast webmail, I cannot change fonts, underline, bolden words. I cannot see the icons. I think I have the same problem using Yahoo and Firefox.
5
10273
by: Jarson | last post by:
My JavaScript is trying to POST data to a CGI script (Perl) using XMLHttpRequest. My CGI server gets different data from IE than Mozilla Firefox. // For Mozilla, req = new XMLHttpRequest(); // For IE req = new ActiveXObject("Microsoft.XMLHTTP"); req.onreadystatechange = requestHandler ; // function to handle async response req.open('POST', myURL, true); // use POST req.send('foo=11&bar=22') ;
6
13378
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... html file (generated using .NET 2.0 beta2): <form method="post" action="Test2.aspx" id="form1">
0
1582
by: autogoor | last post by:
I want to put a java Applet in a jsp page. Here is what I used: <jsp:plugin type="applet" code="mypackage.myApplet" width="450" height="350" > <jsp:params>...</jsp:params>
9
3139
by: Alex D. | last post by:
Hi, I have a frame in one of my pages that I use to show diferent pages each time. I am experiencing an weird behaviour in Mozilla and Firefox, when the frame's source is specified in the server side it works OK, but when the content of the frame is changed in the client browser clicking over a link then the frame dont render the pinctures but just the text. I dont understand. Any ideas?? Thanks.
8
7773
by: Clément | last post by:
Hi! I am currently developping a user interface with Ajax/C#/.net. And I am facing a problem with Mozilla, and Firefox. I use the function innerHTML to load a Web UserControl into a div, this way the main page never gets refreshed. It works perfectly under IE, but with Mozilla and Firefox I got a problem : there is a space before the thing I want to display everytime I use ".innerHTML".
1
4423
by: blueday61 | last post by:
I am a website newbie, and built my site using a template and NVU. After I have it operational, I see that it doesn't display correctly in IE. My site is www.indianacemeteries.org . What do I need to do to make it display correctly? Thanks!
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
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
10049
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...
0
9865
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
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
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
3
2815
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.