[thelist] Logic Help (SQL tables)
Jonathan Lim
jonathan.lim at netdecisions.co.uk
Fri Jul 28 12:02:27 CDT 2000
Hi Palyne,
You could use the 2 select box method. Populate the right with everything
from your glossary (simple SELECT) then you would write some javascript to
handle the to and frow bit. Finally, your form handling page would only
worry about the left hand select box.
If you want to prepopulate the left side, then that's another statement
handler(query). To make it neater you may even remove these elements for the
right hand list.
An alternative to all of this is to create another popup which can allow
them to search for glossary items.
And another: Why not let them do a free form search and then deal by
checking if anything they entered is in the glossary?
Might be able to help a bit more if we knew more details. Perl DBI? PHP? CF?
ASP? etc...
Later,
Jon
-----Original Message-----
From: Palyne Gaenir [mailto:palyne at sciencehorizon.com]
Sent: 28 July 2000 12:53
To: thelist at lists.evolt.org
Subject: [thelist] Logic Help (SQL tables)
Dear Evoltians,
I have a sql-table/form-logic problem I'm hoping someone can help me
think through.
I am making a table that will hold "a piece of a page" in a textbook
(to simplify). I have an existing "glossary" table (full of glossary
terms), and a glossary-affiliation table (empty so far) that links
each glossary entry to an unlimited number of 'references' to it from
around the textbook.
I need to make it so when the user is entering the "piece of textbook
page" into a simple form, they can also say, "and associate the
following 1 to 5 glossary terms with this entry."
The problem is, putting an entire bleepin' glossary into a multi
select box is really not very practical! And breaking it up into 26
letter boxes is not very practical either. And I want this to be a
one-page form (I'm open to a pop-up idea for the choosing, but I
guess some kind of javascript would be needed to update in that
case).
I do need them to choose the values from the glossary list. (Which
will show them terms, but will insert the term record-ID values into
a column in the 'piece of page' table. I'll do a "where IN" query to
get the gloss terms that match a given 'piece of page' record.) It's
just that the list is far too long for a simple multiple-select.
I wondered if some kind of "two column list select" (does such a
thing exist for sql?) would work? You know, where one really long
scrolling list is on the right side, and you click an entry and press
some kind of <== "add" button and it adds it to the left box, so you
can see what you've got, and you can "remove" from left as well? Do
you think this would work? I'm not sure via SQL I could bring this
same box up pre-populated for "edit" purposes...
Surely someone has encountered this problem before? Needing to have
a user choose multi entries from a VERY long list of values? Can
anyone think of a more practical way to accomplish this goal?
Most grateful regards in advance to all the resident experts,
Palyne
---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list