On Mar 5, 7:10 am, Thomas 'PointedEars' Lahn <
[email protected]>
wrote:
My. Certainly a strongly opinionated fellow, aren't you?
Please justify that statement. Otherwise it is simply noise fuzzing
out the signal. I've used it, and it works in the major browsers.
That is invalid. Not only has the `img' element no `onload' attribute, the
`alt' attribute is required.
The code is an off the cuff example, not professionally written
material for a production system. Obviously. Regardless, it still
works. As I am sure you are well aware, JS does not have strict
requirements about runtime validity / well-formed-ness (unlike, say,
XML). And, as I mentioned, img's onload is not a web standard but it
is still supported by most browsers.
So you would have to display the wait image first, and then display the
actual image. That would not work without client-side scripting,
Yup. Oddly enough, most people use JS for client side scripting.
Very weird that that should be a solution presented for a question
asked on a JS newsgroup, eh? And yes, some people don't have JS
turned on in their browsers.
Well, screw 'em! Heh. Either that, or use JS to hide the images
while they're loading by plonking a short inline script after each
image to tweak it's style attributes and a similar code snippet to
show the 'please wait' image. I'm not here to work out all the
details on how to make the page mechanics robust - he can do that
himself, and if he needs help with it he can ask again. I'm here to
address the original question (and now to argue with you)
the wait
image would be displayed forever,
It would not for most browsers. As I've said, I've used img onload
before, and it works. We don't live in a perfect world - not
everything is to standard, nor are standards necessarily reflective of
reality.
the real image would not be indexed by
search engines et cetera et cetera. Great.
:shrug: Wasn't a consideration in the original question, and I doubt
most people care whether Google images shows up your pics. The show/
hide inline scripts I mentioned above would take care of that too.
Even so, I have no clue if bots would think that that was cloaking or
not; that's a question for the search engine people. Are you an SEO
expert, out of curiosity?
Sincerely trying to be helpful rather than obstructive, pompous and
condescending,
Tyler
Tyler