Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 November 14th, 2003, 12:32 PM
Authorized User
 
Join Date: Jul 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default javascrpit + vbscript

ok heres the deal, i have a site that works fine in asp + vbscript but there is a need for some client side checking of information in some fields. The user can enter an order of variable length and i have to check to make sure that the quantity and price fields contain numeric data. since there can be anything from 1 to 9 qty and price fields, named qty1, qty2 etc dynamically using vbscript, i am having real trouble getting either java/vbscript to look at these fields and validate the data. any help would be much appreciated.
Slán
~M

Mark Hardiman
Senior Developer
Kernel Software Ltd
 
Old November 14th, 2003, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

The standard syntax is:
valueInField = document.formName.fieldName.value;

as for the checking bit, you can use regular expressions, or the built-in JS functions parseInt and parseFloat - then use isNAN() function to see if it is Not-A-Number.

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript junedali10 VB How-To 3 September 27th, 2006 03:06 PM
VBSCRIPT pantera710 Classic ASP Basics 3 September 11th, 2006 09:28 PM
Need Help in VBScript ragavendran31 Pro VB 6 0 April 19th, 2006 05:54 AM
Using JScript with VBScript jwalborn Javascript How-To 4 October 13th, 2003 10:07 AM
Using VBScript and JavaScript together jwalborn Classic ASP Professional 2 October 13th, 2003 10:06 AM





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