[Mapserver-users] Re: On-the-fly generated picklists in query-forms
Roman Meier
mapserver at gismap.ch
Sun Oct 26 01:54:45 PST 2003
Hi again
Sorry, let me try again and give you some more informations on what I'm
planning to do...
The user of my webgis will be able to add values to the database (postgis)
and to query the data using a form. That's why I dont want to use a common
picklist in the form because I dont know what values have been entered by
the user. The picklist must be generated on-the-fly.
I hope, things are more clear now...
Thanks, Roman
-----Ursprüngliche Nachricht-----
Von: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]Im Auftrag von
pkishor_98
Gesendet: Samstag, 25. Oktober 2003 22:33
An: mapserver-users at lists.gis.umn.edu
Betreff: [Mapserver-users] Re: On-the-fly generated picklists in
query-forms
--- In mapserver-users at yahoogroups.com, "Roman Meier" <mapserver at g...>
wrote:
> Hi list
>
> A bit off topic maybe...
really ;-)
>
> I would like to implement an unconventional picklist in my queries. Using
a
> form, the user should have the possibility to select the searchstring out
of
> a picklist. The picklist is generated on-the-fly(!). The function searches
> the table (postgis, mysql or dbf) for all items, that have been entered
> before...
>
> - Did somebody do something like this before?
> - How can I implement this using php/mapscript and postgis?
> - Any ideas?
>
given that you are asking this, I am going to assume there is something
specific here
that is out of the ordinary... I mean, this is one of the commonest devices
one sees on
the web, so why...?
Anyway -- assuming you want to populate a form using values from a table --
1. query the table for values and text, and create a form
select values, text from table where whatever
<option value=$value>$text</option>
and then use the $value to query the database for the results.
If you want something that focuses on the items as you type characters, you
can fill a
javascript array with the $text values, and then use onkeypress to trap the
characters
as they are typed, search through the array, calculate the selectedindex and
focus on
the fly. Is that what you asking?
If it is something else you are asking, my apologies -- I didn't understand
the
question.
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list