.......I found you can do var*1 to get it to type cast. Thanks.
-Josh On Tue, 3 Aug 2004 11:28:16 -0500, Josh Close <[EMAIL PROTECTED]> wrote: > Is there any way to do a typecast in javascript? I know you can in > 2.0, but that won't work here. > > I have an input field and I need to add a number to it's value. > > var + 123 == 'var123' > > You would think that it would automatically typecast var to an int > since it's being added to one, but it just concatenates it instead. > > How can I add (or sum) the two values? > > P.S. I'm doing this in a php page... that's why I'm asking here. > > -Josh > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php