[thelist] HTML Forms: Handeling blank spaces
Wade Armstrong
wade_lists at runstrong.com
Fri Jul 11 14:02:07 CDT 2003
on 7/11/03 11:07 AM, Casey Crookston at casey at thecrookstons.com wrote:
> I've got a simple HTML form using mehod = post, and there are a couple of
> hidden values. Trouble is, every time one of these hidden values contains a
> blank space, everything after the space is dropped. How do I force it to
> convert to %20 (or what ever it is for blank) instead of dropping it?
Are you surrounding your attribute values with "s ?
For instance, the following will truncate your value after the first space:
<input type=hidden name=somefield value=a long sentence>
Quoting the value will avoid truncation:
<input type=hidden name=somefield value="a long sentence">
Of course, for good form, and validity, you should quote all attribute
values:
<input type="hidden" name="somefield" value="a long sentence">
There's just no good reason not to.
Wade
More information about the thelist
mailing list