473,785 Members | 2,772 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
36 3568
Gérard Talbot <ne***********@ gtalbot.org> writes:
Tim Slattery wrote :
<body onresize="Cente rIt();" onmousemove="mo useCheck(event) ;">

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".


No. Inside an intrinsic event handler, all current browsers make the
triggering event available as a variable called "event". IE just uses
a global variable, the other browsers use a local one (I guess Opera
might do both :).

So, try it before you bash it :)
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #11
Jim Ley a écrit :
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,


Well, unless specified otherwise by a poster, I will assume a standard
doctype, not a custom or oddball doctype decl.
particularly onresize on body which is supported by the majority of user agents.


onresize seems to be supported by the body element but it's the window
object that gets+handles the resize event in such case.
onresize usage on the body element is not valid. Not according to HTML
4.01 specs.

Gérard
--
remove blah to email me
Jul 23 '05 #12
Lasse Reichstein Nielsen a écrit :
Gérard Talbot <ne***********@ gtalbot.org> writes:

Tim Slattery wrote :


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


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".

No. Inside an intrinsic event handler, all current browsers make the
triggering event available as a variable called "event". IE just uses
a global variable, the other browsers use a local one (I guess Opera
might do both :).

So, try it before you bash it :)
/L

Hello Lasse,

Ok, I will try it.

I tried to contact you several weeks ago. I wrote this document

http://developer-test.mozilla.org/en/docs/window.open

(at least its original, initial version)
and added your article as a reference. Just thought you wanted to know.

Gérard
--
remove blah to email me
Jul 23 '05 #13
On Fri, 08 Jul 2005 06:19:40 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:
particularl y onresize on
body which is supported by the majority of user agents.

onresize seems to be supported by the body element but it's the window
object that gets+handles the resize event in such case.


So, that's completlely irrelevant.
onresize usage on the body element is not valid.
Please understand, that it's potentially completely valid, even with
an HTML 4.01 strict doctype declaration, you can just add it into the
internal subset. The reason I'm discussing this is that your post was
misleading, the onresize in body is well supported, almost certainly
the preferred way to declare onresize, and well documented in Mozilla
FireFox, as well as other user agents.
Not according to HTML 4.01 specs.


We have no reason to believe the OP was using HTML 4.01

Jim.
Jul 23 '05 #14
Gérard Talbot <ne***********@ gtalbot.org> writes:
http://developer-test.mozilla.org/en/docs/window.open

(at least its original, initial version)
and added your article as a reference. Just thought you wanted to know.


Very nice, at a glance. I'll read it through as soon as I get the time :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #15

"Simon Wigzell" <si**********@s haw.ca> wrote in message
news:Pzeze.1892 161$Xk.818923@p d7tw3no...
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!

I have resolved my problem. This is what I have to do:

<body>
<script language="JavaS cript" type="text/javascript">

checkmouse = 0;
checkresize = 0;

document.onmous emove = mouseCheck;
function mouseCheck()
{
if (checkmouse == 0)
{
alert("Mouse Moved");
checkmouse = 1;
}
}
window.onresize = resizeCheck;
function resizeCheck()
{
if (checkresize == 0)
{
alert("Resize") ;
checkresize = 1;
}
}

</script>
</body>

Now couldn't one of you have just answered my question and told me this
instead of all this jibber jabber????

Thanks anyway!
Jul 23 '05 #16
Jim Ley wrote :
On Fri, 08 Jul 2005 06:19:40 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:

particular ly onresize on
body which is supported by the majority of user agents.

onresize seems to be supported by the body element but it's the window
object that gets+handles the resize event in such case.

So, that's completlely irrelevant.


I do not understand why you say it's completely irrelevant.

How often does one resize the body element without using the resizing
window handles of a browser window?
I do not know of a single occurence or webpage where one resizes the
body element without resizing the browser window; theoretically, that
should be doable, possible.

<body onresize="...">
is invalid markup code. That markup code is supported by many browsers
because the onresize event handler gets handled by the window, not the
body element. That's why I referred to internal browser error mechanism.
onresize usage on the body element is not valid.

Please understand, that it's potentially completely valid, even with
an HTML 4.01 strict doctype declaration, you can just add it into the
internal subset.


I understand that it's potentially completely valid. But it's not valid
with a standard HTML 4.01 doctype declaration. onresize attribute is not
listed anywhere in the HTML 4.01 spec.:
http://www.w3.org/TR/html4/index/attributes.html
onresize attribute for body element is not even listed as deprecated either.
How often do you see web authors/web pages using a custom DTD or a
modified DTD or an extended DTD?
How often do you see people saying in this newsgroup that they use a
custom DTD or a modified DTD or an extended DTD?

<body asdf="ghjk">
is invalid markup code. But then if one has to always add that this is
in cases where a custom DTD or extended/modified DTD is not used, then
posting in this newsgroup can/should become very long, tediously
explicit, excessively exact, miserably cautious, mono-maniacally detailed.

The reason I'm discussing this is that your post was misleading,
I said word for word this:
"There is no onresize event handler for the body element in HTML 4.01:
so that too is invalid."
and you're saying my post was misleading.
the onresize in body is well supported, almost certainly the preferred way to declare onresize,
Well that way should not be the preferred way to declare and use the
onresize attribute. In HTML 4.01. When using an official W3C doctype. In
a non-modified DTD. In a non-custm DTD. In a very vast majority of
webpages on the web.
Is that the way we should always post from now on?

and well documented in Mozilla FireFox,
Ok go ahead: bring the url at mozilla.org where it says that <body
onresize="..."> is valid, ok, good enough, preferable or whatever.

as well as other user agents.
Not according to HTML 4.01 specs.

We have no reason to believe the OP was using HTML 4.01

Jim.


Above 99% of all webpages on the web and above 99% of people posting in
this newsgroup do not use a custom DTD nor an extended/modified DTD.
Without any url from the OP, without any sufficient chunk of relevant
code pasted from the OP, without any kind of useful data from the OP
post from the OP, why shouldn't I assume he is using HTML 4.01? standard
HTML 4.01 that is. Non-modified HTML 4.01 DTD.

Gérard
--
remove blah to email me
Jul 23 '05 #17
On Fri, 08 Jul 2005 23:02:10 -0400, =?ISO-8859-1?Q?G=E9rard_Ta lbot?=
<ne***********@ gtalbot.org> wrote:
<body onresize="...">
is invalid markup code.
Stop repeating that fact, it's not invalid, it may be invalid in some
documents, but it's not invalid in all.
I understand that it's potentially completely valid. But it's not valid
with a standard HTML 4.01 doctype declaration.
It can still be, consider the internal subset.
How often do you see web authors/web pages using a custom DTD or a
modified DTD or an extended DTD?
Lots.
the onresize in body is well supported, almost certainly
the preferred way to declare onresize,
Well that way should not be the preferred way to declare and use the
onresize attribute.


Sure it should, it's the method that most works.
Is that the way we should always post from now on?
We should post the most sensible advice, and for registering an
onresize event <body onresize is appropriate. You could against argue
that it's not, but if your only argument is about validity, then it's
not a good one, as it can be perfectly valid.
and well documented in Mozilla
FireFox,
Ok go ahead: bring the url at mozilla.org where it says that <body
onresize="..." > is valid, ok, good enough, preferable or whatever.


eh? it's documented do onresize site:mozilla.or g in your favourite
search engine and read the documentation.
Above 99% of all webpages on the web and above 99% of people posting in
this newsgroup do not use a custom DTD nor an extended/modified DTD.


No 99% of all the web pages are invalid, a minority of some boiler
plate gibberish at the top they don't understand, but that's not
particularly relevant.

<body onresize is the most appropriate, if your work flows involve
valid HTML, then there are trivial scenarios you can use, as anyone
who's validating their mark-up should know about.

Jim.
Jul 23 '05 #18
Jim Ley escribió:
and well documented in Mozilla
FireFox,

Ok go ahead: bring the url at mozilla.org where it says that <body
onresize="... "> is valid, ok, good enough, preferable or whatever.


eh? it's documented do onresize site:mozilla.or g in your favourite
search engine and read the documentation.


Keeping your "absolute strict" way for stating things, your post is
misleading because... do all search engines (or, at least, all search
engines which are favourite for, at least again, one person in the
world) support the "site:" rule syntax?

Of course you were referring to Google above all. And, if I insert those
terms on google, I don't find anything about "<body onresize="..."> ". On
the other hand, I see that the first result title is "window.onresiz e".

Regards,

knocte

--
Jul 23 '05 #19
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?
Your irony is as inappropriate as your posting style.

<http://diveintomark.or g/archives/2003/05/05/why_we_wont_hel p_you>
"Richard Cornford" <Ri*****@litote s.demon.co.uk> wrote in message
news:da******** ***********@new s.demon.co.uk.. .
[top post]


<http://jibbering.com/faq/#FAQ2_3>
<http://www.jibbering.c om/faq/faq_notes/pots1.html>
PointedEars
Jul 23 '05 #20

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
3099
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
7774
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
9480
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
10147
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
10087
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
9947
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...
1
7496
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
6737
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
5380
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...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.