Steve Swift a écrit :
sa*************@googlemail.com wrote:
>how can i know if the browser of the client are enable images to
display.
The only mechanism I can think of is to run some JavaScript at the
beginning of the page load (inline, near the start of the HTML) that
stores the time, and then again in the onLoad event where it subtracts
the load time from the current time. Include an image which is huge,
but preferrably invisible.
I think we have not to wait downloading time since compliant graphical
browsers wait all images are loaded before to launch the JS 'onload'
attributed to the body tag.
If the page takes a long time to load, then presumably the browser
downloaded the image, so has images enabled.
You can also use an 'onload' in a transparent very small image to toggle
a variable defined previously in the head.
This approach has so many flaws that I don't have the time to list them.
See my code given in my previous post.
Tested on my browsers, it seems to work (except in IE Mac which launches
the body onload before loading images) but I don't know what that could
give in a text browser ?
(do text browsers use JS ? if yes, what that can give with dhtml ?)
--
sm