|
Posted by Adrienne Boswell on 11/04/07 07:37
Gazing into my crystal ball I observed dorayme
<doraymeRidThis@optusnet.com.au> writing in news:doraymeRidThis-
6CD4C8.13460304112007@news-vip.optusnet.com.au:
> In article <Xns99DDB5B2C4F8Carbpenyahoocom@69.28.186.121>,
> Adrienne Boswell <arbpen@yahoo.com> wrote:
>
>> Gazing into my crystal ball I observed dorayme
>> >>
>> >> loop though the array until you reach breaknow then end the list
and
>> >> start another. If the total is not an even number, then the last
>> list
>> >> will have one extra item.
>> >
>> > Suppose there 400 items. Are you proposing a script that is alive
>> > to the browsers window size or just to split lists into groups of
>> > 10?
>> >
>>
>> Personally, I would never put 400 items on a single page (even
looping
>> through an array, and certainly not an open recordset), that's what
>> paging and good database design are about.
>
> I have a web page of all the postcodes in Australia. The html
> page has more than 17000 lines. I find it very convenient on one
> page! For one thing, one does not even need a menu. Searching the
> page is dead simple (command F and type first letters of town), I
> love it for its artlessness <g>. Yes, an internal menu that was
> fixed might also be nice to get to the different states but
> anyway... I mention not as a pure aside. If you accept that
> sometimes it is convenient to have a lot of stuff on a page,
> there is the question of a fluid design that will get as much of
> it as will fit on the screen and be convenient to read.
I agree that Ctrl-F or Command F is very simple, but I wonder how many
people really know to use that, or if they would think to do that. I
do, and I love Opera's find in page widget (I use it for Google's cache
all the time).
For example:
SELECT vendor_name, address, city_name, state_abbr, zipcode, phone, fax,
email, product_name, description, category, classification
FROM vendors v, categories c, classicifications cl, products p
WHERE v.id = p.vendor_id
AND p.category_id = c.id
AND p.classification_id = cl.id
AND city_name = 'Los Angeles'
ORDER BY product_name
A query like this could result in thousands of records, a very large
record set. Of course, I put it into an array and close the record set
right away. Still, that's a lot a looping. If you have to loop through
an open recordset, it's even worse.
>
> Correct me if I am wrong, your suggestion is to grab the items in
> the list and divide them up into fixed-beforehand numbers of
> items per ul. And float the ul's. Indeed, this would be fluid and
> convenient if the lists were roughly the same length (the number
> of items in a list cannot guarantee this, and I don't think
> server side is good at semantics. I suppose there could be a
> check on list size length built in and so on).
Yes, because when putting something like this into an array, you can
find out the number of items in the array. I would prefer to do that
than open one recordset to get a count, and another to get the records.
>
> I was interested in this, Adrienne, because I did (but by hand) a
> slightly similar thing for a page a while back which was broken
> into blocks that floated and was not too bad in using up the
> available space, there would be "wrapping" according to view port
> width. I carefully arranged the floats based on length so they
> would not snag in an ugly way when wrapped (by having the lists
> go in size order, smallest first.
>
Much easier to do it server side. Find out the total, and divide
accordingly. I do most of my developing in ASP, and I'm tired tonight,
otherwise, I'd give you a little sample.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
[Back to original message]
|