On Sun, Jan 31, 2010 at 9:11 PM, HS WAI <drwa...@yahoo.com.sg> wrote:

> Hi,
>
> Thanks for your prompt response.
> I want to get the value form user input/selected option
>
> <html>
> <body>
> <select name='query' id='query'>
>   <option value='a'>a</option>
>   <option value='b'>b</option>
> </select>
>
> <%
>   # How to get user selected option?
>
>   # what I want to do ....
>   # if option == a,  get data from a xml file... where the childNode is "a"
>   #
>   # i.e. select different option will get different data from a xml file
>   # no form is called
> %>
>
>  <input type="hidden" id="selected" name="selected" value="<%= #data from
> xml %>">
>
> </body>
> </html>
>
>
> Thanks for your help and advise.
>
Hi,

Take a look at WebKit/Examples/ListBox.py for how to handle the client's
post (action) and get at the values in the form. You'll basically look  at
self.request().field('yourfieldnamehere') to get the submitted value.
There are a number of useful examples in that directory that should help
you.

Best Regards,
Steve
http://agilitynerd.com/   http://googility.com/
Wristband Closeout Sale! http://store.agilitynerd.com/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to