Current location: Hot Scripts Forums » General Web Coding » JavaScript » Java Script Form Validation


Java Script Form Validation

Reply
  #1 (permalink)  
Old 10-14-04, 05:03 AM
blessedrub blessedrub is offline
Newbie Coder
 
Join Date: Jan 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Java Script Form Validation

How can I validate input values that come in from an array

This is the javascript code

if(document.webform.FirstName.value == ""){
window.alert('You must enter your First Name! Please Try Again');
event.returnValue=(false);}


This is the way that the value is being brought in

<input type= Text Name= "Array[Amount]" size="10">
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-15-04, 11:03 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Hmmm, Why is Name= "Array[Amount]" there? That simply sets the field's name to "Array[Amount]" but you check for a field with the name "FirstName".
Don't think you can use [ and ] in a field name either...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Php form validation script blessedrub PHP 4 10-16-04 08:15 PM
PHP Form Submission script sixflagsga Script Requests 0 10-10-04 08:26 PM
Flexible form validation question epetoke JavaScript 6 09-12-04 05:19 PM
Passing form output more than 1 script iwpg Perl 5 09-07-04 05:46 PM
live chat script, form script, autoresponder, babalu Script Requests 0 12-04-03 02:55 PM


All times are GMT -5. The time now is 01:55 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.