× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You don't have to have an axe to grind to speak honestly about IE's problems
and the reasons for them. At the end of the day IE's problems are our
problems. I do take issue with developers who play into the Extend portion
of MS's Embrace, Extend, Extinguish strategy to subverting standards.

In the example you provided you're not dealing with IE vs. FF. You're
dealing with the MS-IE event model vs. the standard DOM model. If you write
for the standard DOM model your code should work relatively the same in FF,
Mozilla, Ice Weasel, Camino, Safari, Konquerer, Opera, etc. etc. However,
there's that 80% IE market share that makes you have to rebug your code for
IE.

There are some schemes for normalizing the IE and DOM event models. The ones
I've used rely on nested ternery statements checking for the presence of
properties in the event object.

On Thu, Jul 31, 2008 at 12:05 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

From: Pete Helgren
I guess someone who had an axe to grind with Microsoft and
didn't mind losing business could implement logic that would
only run on non-MS browsers.

I could admit to something here, but I don't want folks to think of me as
devilish ...

More seriously, IE used to be my "preferred" browser, then I switched to
FF, and I can see how developers can get zealous about one or the other.

Regarding the behavior of the Table component that I referred to in other
threads, I needed to attach a "click" event-listener to "row" objects and
refer back to the row object that was the target of the event. Firefox
provides a reference to the row in the event currentTarget property. Easy!

IE events don't have a currentTarget property. They have a srcElement
property, but if the row contains other elements, say another table for
example, the reference in the srcElement property, may be referring to an
element way down in the bowels of the DOM hierarchy.

You think, Blast! I just attached the event listener to a "row", but
something I many not even be aware of in the bowels of the DOM hierarchy is
triggering the event, and the event srcElement is pointing to it! So you
write another layer of code to work your way up the DOM hierarchy. At each
step, you ask "are you my mother", "are you my mother", "are you my mother",
until you find her. And you have to come up with a kludge for identifying
the right mother.

I suppose someone could come up with an example of how Firefox makes
something harder, but the point is that you kind-of get a feel for your
preferred environment and things are easier for you there.

Nathan.



--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.