[Javascript] Image Change
Paul Novitski
paul at juniperwebcraft.com
Sun Jul 15 22:36:18 CDT 2007
At 7/15/2007 06:09 PM, you wrote:
>If i wanted to do something similar to this
>
><http://triggsmitharchitects.com/project.php?id=5>http://triggsmitharchitects.com/project.php?id=5
>
>see the smaller thumbs? and then when you click on them the larger
>image loads - how would i do that with javascript? they seem to be
>reloading the entire page - which I would think is a "bad
>implementation" when you can use client side to fix it.
Actually, I think the page you've pointed us to is designed fairly
well. When JavaScript is absent (disabled or not yet loaded),
clicking on a thumbnail reloads the page with the requested image
showing. After the page finishes loading and JavaScript launches,
the images are indeed swapped immediately.
The problem with the implementation that you discovered but didn't
understand is that JavaScript doesn't kick in until everything on the
page has downloaded, including those several large pre-loaded
images. So if you're quick to click on a thumbnail you'll catch it
before it has time to shift from server-side to client-side functionality.
Regards,
Paul
__________________________
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
More information about the Javascript
mailing list