[jQuery] SOT: execute JS before a specific image loads

[jQuery] SOT: execute JS before a specific image loads


Can I intercept the loading of an image BEFORE it loads?
We're looking at using an img tag for inserting stats on our server. Here's
what I'm considering...
1) Collect certain information server side, write an img to the document
like so (note the URL vars):
<img id="statsImg" src="stats.cfm?somevar=someval" width="1" height="1" />
2) Using JS, intercept the load of this image BEFORE it takes place, and add
things to the URL vars.
This way, if JS is not present, you get the default stuff, but if JS is
present, you get extra stuff.
Anyone?
Andy Matthews
Senior Web Developer

www.dealerskins.com
P Please consider the environment before printing this e-mail.
Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at awest@dealerskins.com.