[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] query



Jason queries:

> While one visitor to the site has access to an enlarged
> image from a thumbnail into the frame, the thumbnail of
> that image is replaced with a "in use" image until the
> browser with the 'posession' of the enlarged image returns
> the image,so to speak, by either leaving this particular
> page or clicks on a button to beturn the image, or clicks
> on another thumbnail of an unused image.

Two big problems with this. The first, David pointed out is
making the page reload. I have no idea if you can do the
things David suggested without some serious performance
issues. One thing that could work, maybe, is using a

  <META HTTP-EQUIV="refresh" CONTENT="60; URL=http://???">

in your <HEAD> block. Replace the 60 with the frequency in
seconds you want to force a reload of the frame and plug in
the appropriate URL. This probably goes without saying, but
it probably doesn't work for all browsers... Also, for short
refresh rates, the user may notice distracting, undesirable
jumping from the page reloading. I've done this to force a
reload of pages that change on an hourly basis.

The second problem is that you are most likely going to have
the occasional user who fails to free his/her image. This
could happen because the user minimizes a window and forgets
about it for hours (or days). It could also happen if the
browser terminates inappropriately (i.e. crashes). There may
be other scenarios. This could be an administrative nightmare.

Personally, I would look for an alternate plan, but then I
don't know exactly what you're trying to do and why. Perhaps
you could change your metaphor such that clicking on a
thumbnail merely represents a request for that image. If the
image is unavailable, write a message into the other frame
stating the image is in use. You could even use the "refresh"
mechanism shown above to let the user wait for the image to
become available or let the user use his/her "back" button to
effectively cancel the request. I know it's not quite as user
friendly, but it's much simpler to implement.

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org