M
Matt Kruse
There are a lot of dhtml libs out there, and a lot of people doing the
same work over and over and over to support all the possible browsers
for simple things like finding an object's position and moving it to a
new position.
Is there a single source that is the best place to get cross-browser
functions for performing the most low-level dhtml actions?
For example,
1) Get an object's x,y position relative to the page given its ID
2) Get an object's x,y position relative to the window given its ID
3) Move an object to position x,y relative to page or window, given
its ID
4) Detect a mouse click's x,y position relative to page or window
5) Detect a mouse move's x,y position relative to page or window
These are, I think, the core of a lot of DHTML functionality. And
there are numerous browser quirks which require branching and logic to
get accurate x,y coordinates of events and objects. Supporting IE 4+,
Netscape 4+, Mozilla, Opera, Safari, etc can be complex.
Also, many libraries which do these things very well have their code
obfuscated or overly complicated by 50 other functions to add
functionality.
For example, http://www.walterzorn.com/dragdrop/dragdrop_e.htm is an
excellent lib that has a lot of functionality, but the low-level DHTML
logic is hidden by a lot of other code.
So, what's the best source for cross-browser,
tested-on-everything-imaginable-and-browser-quirks-taken-into-account
functions to perform low-level functions?
I try to do this myself for libs like
http://www.mattkruse.com/javascript/dragiframe/ but testing all these
browsers and fixing their bugs is a maintenance nightmare...
Thanks!
Matt Kruse
http://www.mattkruse.com/javascript/
same work over and over and over to support all the possible browsers
for simple things like finding an object's position and moving it to a
new position.
Is there a single source that is the best place to get cross-browser
functions for performing the most low-level dhtml actions?
For example,
1) Get an object's x,y position relative to the page given its ID
2) Get an object's x,y position relative to the window given its ID
3) Move an object to position x,y relative to page or window, given
its ID
4) Detect a mouse click's x,y position relative to page or window
5) Detect a mouse move's x,y position relative to page or window
These are, I think, the core of a lot of DHTML functionality. And
there are numerous browser quirks which require branching and logic to
get accurate x,y coordinates of events and objects. Supporting IE 4+,
Netscape 4+, Mozilla, Opera, Safari, etc can be complex.
Also, many libraries which do these things very well have their code
obfuscated or overly complicated by 50 other functions to add
functionality.
For example, http://www.walterzorn.com/dragdrop/dragdrop_e.htm is an
excellent lib that has a lot of functionality, but the low-level DHTML
logic is hidden by a lot of other code.
So, what's the best source for cross-browser,
tested-on-everything-imaginable-and-browser-quirks-taken-into-account
functions to perform low-level functions?
I try to do this myself for libs like
http://www.mattkruse.com/javascript/dragiframe/ but testing all these
browsers and fixing their bugs is a maintenance nightmare...
Thanks!
Matt Kruse
http://www.mattkruse.com/javascript/