W3C home > Mailing lists > Public > www-html@w3.org > December 1998

Re: Any way to input numerical/integer data in form?

From: Walter Ian Kaye <walter@natural-innovations.com>
Date: Tue, 22 Dec 1998 10:52:57 -0800
Message-Id: <v03130314b2a5998b7442@[134.79.129.61]>
To: www-html@w3.org
At 1:33a -0800 12/22/98, kgeorge@tcpsoft.com wrote:
>Scott-
>
>  The reason that numbers in a web page are essentially text strings
>representing numbers.  When you enter "432" in a text box those are the
>characters '4' (52), '3' (51), and '2' (50).  Now you might ask, "Why
>doesn't the browser (or why isn't there a feature to) convert the text
>string to a number before the form is posted?"  The reason is because
>form data needs to be posted using text strings.  This was the way http
>and html were designed.  However, it is not too hard to convert the
>ascii string "432" to the integer 432.

And besides, real programmers only need one datatype. <g>


-Walter
 o/` you can't always GET what you want
     you can't always POST what you want
     you can't always HEAD what you want
     but if you try sometime
     you just might find
     you HTTP
 o/`
Music by the Rolling Stones
Lyrics by WIK
Received on Tuesday, 22 December 1998 13:54:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:38 GMT