Msg#: 3576861 posted 8:29 pm on Feb 21, 2008 (gmt 0)
I cannot use redirect because I am using a free host and that is against the TOS.
However, I found the solution. As you mentioned, it appears indeed that FF has not the time to load the image. However, adding target="_blank" in the <a> gives a little extra time ... just enough for the onclick to be successfull.
Although it opens a new windows for the link (no so elegant), it does solve my problem.
What does it do ? If there is a "target" that opens a new window (either target="_blank", or a named window target="A_name"), the script allows the normal "click on a link" processus to proceed. If there is no target, or one that doesn't open a new window, il stops the normal clicking processus by returning "false". It sets a timer to do this instead. Note: waiting for "0" second means that the timeout will start immediately after the current script as ended. 0 is enough to allow FF to request the image. Even if it has not the time to complete the load, your sever log will show the request.
I've not refined the code to open the link correctly when "target" is either "_top" and "_parent".
[edited by: Achernar at 2:07 pm (utc) on Feb. 22, 2008]