[Tutor] cgi form field and popup window

Paulino paulino1 at sapo.pt
Fri Oct 27 00:25:17 CEST 2006


> paulino wrote:
>   
>> I would like to have a popup window to show the possible options to a form field
>> (supplier ID) and that by clicking on the desired item, the field is
>> automatically filled. The options are a database field values.
>>
>> I wonder if this is possible to do with python (point me some resources please),
>> or have I to deal with javascript ?
>>     
>
> The browser-side programming has to be in javascript. The server-side 
> program that sends the javascript and the list of options to the browser 
> can be in Python.
>
> You might want to look at the TurboGears widget set which provides many 
> browser-side widgets that are configured from Python. Widgets are part 
> of TG 1.0. Unfortunately the docs seem to be a bit thin and sorting it 
> all out is probably not a beginner project.
> http://www.turbogears.org/
> http://tgwidgets.toscat.net/
>
> Kent
>
>
>   

Many thanks, Kent, that's what I was afraid of.

Well an alternative would be to use a drop down box with all the 
suppliers ID's as options - a few thousands, is it viable? But this way 
the user can not introduce manually any ID, he would be forced to pick 
one from the drop down box.

 
In order to give users booth possibilities, I can put an input field and 
a drop down box that would be dealt by a try / except clause.

what do you think?


Paulino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061026/3ce3a0eb/attachment.html 


More information about the Tutor mailing list