Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Bug report: ClientForm

 
Thread Tools Search this Thread
Old 02-28-2009, 11:01 PM   #1
Default Bug report: ClientForm


Hi Folks,

As directed, I got ClientForm and played with it. It is cool! However,
I also found a bug:

When it parses a form, if the VALUE of a field has not space, it works
very well. For example, if a dropdown list, there many options, such
as:

<option value=foo> ....

the value foo will be picked up for sure. But, if there is a space:

<option value=foo bar> .....

The *bar* will be missed out. I wish this bug can be fixed in near
future.

By the way, can somebody helps me on setting parameter of uploading a
file. In ClientForm, if I need to upload a text file, I can do it by:

form.add_file(..., "text/plain")

What about a picture file? What is the counterpart of 'text/plain"?
Thanks!

Muddy Coder


Muddy Coder
  Reply With Quote
Old 02-28-2009, 11:42 PM   #2
MRAB
 
Posts: n/a
Default Re: Bug report: ClientForm
Muddy Coder wrote:
> Hi Folks,
>
> As directed, I got ClientForm and played with it. It is cool! However,
> I also found a bug:
>
> When it parses a form, if the VALUE of a field has not space, it works
> very well. For example, if a dropdown list, there many options, such
> as:
>
> <option value=foo> ....
>
> the value foo will be picked up for sure. But, if there is a space:
>
> <option value=foo bar> .....
>

Values should be quoted, although you can omit the quotes if there
aren't any spaces in the string:

<option value="foo bar">

You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

<input type="checkbox" name="control2" value="foo" id="cbe1">

As you can see, whitespace separates the name=value pairs.

> The *bar* will be missed out. I wish this bug can be fixed in near
> future.
>

It's not a bug.


MRAB
  Reply With Quote
Old 02-28-2009, 11:53 PM   #3
Gabriel Genellina
 
Posts: n/a
Default Re: Bug report: ClientForm
En Sat, 28 Feb 2009 21:01:56 -0200, Muddy Coder <>
escribió:

> By the way, can somebody helps me on setting parameter of uploading a
> file. In ClientForm, if I need to upload a text file, I can do it by:
>
> form.add_file(..., "text/plain")
>
> What about a picture file? What is the counterpart of 'text/plain"?


See http://www.iana.org/assignments/media-types/image/

--
Gabriel Genellina



Gabriel Genellina
  Reply With Quote
Old 03-01-2009, 01:26 AM   #4
Lie Ryan
 
Posts: n/a
Default Re: Bug report: ClientForm
MRAB wrote:
> Muddy Coder wrote:
>> Hi Folks,
>>
>> When it parses a form, if the VALUE of a field has not space, it works
>> very well. For example, if a dropdown list, there many options, such
>> as:
>>
>> <option value=foo> ....
>>
>> the value foo will be picked up for sure. But, if there is a space:
>>
>> <option value=foo bar> .....
>>

> Values should be quoted, although you can omit the quotes if there
> aren't any spaces in the string:
>
> <option value="foo bar">
>
> You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
>
> <input type="checkbox" name="control2" value="foo" id="cbe1">
>
> As you can see, whitespace separates the name=value pairs.


It is also a good habit to have the quotes even when you don't use
spaces. Also, knowledge of xHTML in general should come in handy.


Lie Ryan
  Reply With Quote
Old 03-01-2009, 01:26 AM   #5
Lie Ryan
 
Posts: n/a
Default Re: Bug report: ClientForm
MRAB wrote:
> Muddy Coder wrote:
>> Hi Folks,
>>
>> When it parses a form, if the VALUE of a field has not space, it works
>> very well. For example, if a dropdown list, there many options, such
>> as:
>>
>> <option value=foo> ....
>>
>> the value foo will be picked up for sure. But, if there is a space:
>>
>> <option value=foo bar> .....
>>

> Values should be quoted, although you can omit the quotes if there
> aren't any spaces in the string:
>
> <option value="foo bar">
>
> You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
>
> <input type="checkbox" name="control2" value="foo" id="cbe1">
>
> As you can see, whitespace separates the name=value pairs.


It is also a good habit to have the quotes even when you don't use
spaces. Also, knowledge of xHTML in general should come in handy.



Lie Ryan
  Reply With Quote
Old 03-01-2009, 01:33 PM   #6
Steve Holden
 
Posts: n/a
Default Re: Bug report: ClientForm
MRAB wrote:
> Muddy Coder wrote:
>> Hi Folks,
>>
>> As directed, I got ClientForm and played with it. It is cool! However,
>> I also found a bug:
>>
>> When it parses a form, if the VALUE of a field has not space, it works
>> very well. For example, if a dropdown list, there many options, such
>> as:
>>
>> <option value=foo> ....
>>
>> the value foo will be picked up for sure. But, if there is a space:
>>
>> <option value=foo bar> .....
>>

> Values should be quoted, although you can omit the quotes if there
> aren't any spaces in the string:
>
> <option value="foo bar">
>
> You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
>
> <input type="checkbox" name="control2" value="foo" id="cbe1">
>
> As you can see, whitespace separates the name=value pairs.
>
>> The *bar* will be missed out. I wish this bug can be fixed in near
>> future.
>>

> It's not a bug.


Or, if it is, it's a bug in the web page, not ClientForm!

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/



Steve Holden
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we make Java web report just by drag and drop? freezea Software 0 08-13-2009 07:06 AM
Crystal Report Koteswarr Software 1 06-02-2009 12:20 PM
Crystal stops displaying data when new field added to a report nickmellor Software 0 01-14-2009 01:07 AM
changing Crystal report table at run time rakesh201180 Software 1 10-22-2008 10:58 AM
DVD sales likely nearing global peak: report. Allan DVD Video 0 12-09-2005 04:52 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46