this requires a fairly new version of internet exploiter. this is a media
browser for the content system i'm working on. it has a few interesting
elements. first, i didn't want to keep going back to the server for each
page of images. i wanted to be able to step through pages of images fairly
quickly, so this means i needed to do things client side. this html page
gets written by a jsp which "passes" a bunch of image ids from which i can
guess the url to the icon image. (for example, id 1234 would be
/images/content/001/234_icon.png) so i preload these images and draw an
arbitrarily sized grid with the first set of images exposed. this is a
browser for a result set from a possibly large query, so rather than look up
all the meta information for each of these objects when many of them might
never be looked at, i decided to de-couple the meta information lookup from
the initial page load. i launch a process once per second that goes back and
if need be, fills in the meta information for each of the images for both the
page you are looking at and the next page. the question was how to get data
from a database back to the origional page without blowing the browser away
with the results of the post. my solution was to create a hidden ilayer that
i would send to the fulfillment servlet. the resulting page from the
fulfillment servlet would be displayed in the hidden layer and call a
function in it's parent sending it an array of the results.
( parent.fulfill(results); ) the parent window then populates the master
array of objects with the meta information from the database. if you select
a small grid size, like 2 x 2 and you scroll quickly to the last page, you
will see the fulfillment function skip up to the page you are on and start
to fulfill the meta information there. go back a page and notice that the
fulfillment hasn't been done there untill you hang around for a second or
so. this is just a mockup, so the html is just hard-coded and the
fulfillment "servlet" is really just a perl script responding with "a
picture" as the meta information, but the real version actually works. :)
|