Whats the most standards-compliant way.....

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
Sadrok
Regular Member
Posts: 265
Joined: Sat Jul 28, 2001 5:10 am
Location: South of Africa

Whats the most standards-compliant way.....

Post by Sadrok »

.....to handle events in Internet Explorer and Mozilla?

I'm currently trying to use the DOM2 Event interface, it works nicely in Mozilla but Internet Explorer hates me for doing that :(
You will experience a strong urge to do good; but it will pass.
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

Neither browser is 100% compliant w/ W3C recommendations. You must design according to your target audience.

look here and here
No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
Sadrok
Regular Member
Posts: 265
Joined: Sat Jul 28, 2001 5:10 am
Location: South of Africa

*sight*

Post by Sadrok »

Thanks for the links TonyT.

Looks like I'll have to make use of that isIE variable afterall (I was trying to stay away)

Since IE doesn't have the event object passed as a parameter for the function.

Is there a way to this

Code: Select all

<div id="blah" onMouseOver="bleh(this, 'whatever');">etc. etc.</div> 
in javascript, that is. set an event handler while passing unique arguments to the function.

Then I can automate event handler attachment using data from Arrays and stuff, without having to do it manually within the html.

did this make sense?
You will experience a strong urge to do good; but it will pass.
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
Sadrok
Regular Member
Posts: 265
Joined: Sat Jul 28, 2001 5:10 am
Location: South of Africa

Post by Sadrok »

Thankyou,

I could find out exactly what I wanted to know, but that doesn't matter :p

I've went with the good ol' way of isIE and then just handling the events for IE differently.
You will experience a strong urge to do good; but it will pass.
Post Reply