Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How is it done?
- Jean-Guy Mouton
December 5, 2006, 2:00 pm
rate this thread
Re: How is it done?
Jean-Guy Mouton wrote:
And this is a good idea why?
Unless used in very restricted cicrcumstances, this plopup combines the
worst irritations of popups whilst missing their benefits. It's
perhaps justifiable here for the big screenshot, but it's inappropriate
for the buttons that don't even look bigger when "zoomed".
you'll have a hard time understanding it by reading the source alone.
The real "view the zoomed image" malarkey is just classic DHTML that
throws some dynamic content onto the page, with a little extra added to
hide the old page (why?) and to make it appear slowly with an animation
(WHY?!) This "cute" effect will look awful pretty soon when even the
geocities sites start doing it.
You should do things that make your users' lives better.
You should not do things that makes their lives harder.
Superfluous animation is just making your users wait.
Hiding the background is hiding context that your users might like to
see at the same time.
A "non-popup plopup" is just as annoying as a popup and it doesn't even
have the independent window management that's one of the few good
things to popups.
In particular the coding uses a technique where some code that runs
when the page loads dynamically attaches event handlers to certain
elements of the page in a declarative style - i.e. you specify what
should get handled (look at the use of the rel attribute on the <a>
tags), then the on pageload JS goes and connects up those items for
you. In particular it looks for <a> elements with a href, a title and a
rel attribute, then feeds those to the onclick event handler.
It saves some effort in writing the page. You set metadata per-element
and the rest is handled automatically. Quicker than putting an onclick
event handler there explicitly.
This is a very fashionable technique right now (popular in the AJAX
world) but it makes some of us itch for our clueirons. Personally I
don't do it. I do things very like it, but I do it server-side with
XSLT before serving the page.