Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2006, 08:19 AM
Authorized User
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Make user entered field an integer

I have a form where I want users to enter a number,(1-95) and then the number is compared to an integer database field. How can I convert the user entered number into an integer variable type so I dont get type mismatch errors?
<input type="text" name="slot" size="5" maxlength="2">

 
Old April 10th, 2006, 10:37 AM
Authorized User
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, answered my own question this time.

 
Old April 10th, 2006, 06:17 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Great stuff. Would you be able to post the solution so other can benefit from it

Wind is your friend
Matt
 
Old April 10th, 2006, 10:04 PM
Authorized User
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<input type="int" name="slot" size="5" maxlength="2">

Theres the solution :)

 
Old April 10th, 2006, 10:09 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Interesting. I am not are aware of an input type of int - neither is homesite, is this valid???

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting integer field gloribel Crystal Reports 1 October 13th, 2005 12:27 PM
How to accept apostrophe entered by user karjagis Access ASP 0 April 6th, 2004 06:21 AM
Make an existing field auto_increment Mitch MySQL 1 April 6th, 2004 04:08 AM
knowing from where user entered my page? collie VB.NET 2002/2003 Basics 1 November 17th, 2003 11:32 AM
How to make integer to accept null value ganesh15 PHP How-To 3 August 18th, 2003 01:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.