Web Design and Development Forums

Help with 'if Request.Form' on form

This is a discussion on "Help with 'if Request.Form' on form" within the ASP Forum section. This forum, and the thread "Help with 'if Request.Form' on form are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > ASP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 21st, 2008, 10:46   #1 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Help with 'if Request.Form' on form

Hi all,

I have a form through ASP where users enter their home and mobile phone number.

For the other fields, I use the following script to get them to enter the details if they leave it blank:

if Request.Form("PostalCode") = "" then strErrorMessage = strErrorMessage & "<p>Please enter
your Postal Code.</p>"

How can I do it so that if both the home and mobile number is empty, it says 'Please enter one contact number' - otherwise if only one is filled in, it allows it to go through?!

All advice and help welcomed!

Thanks

Ben
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 21st, 2008, 13:23   #2 (permalink)
Moderator
 
spinal007's Avatar
 
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,609
Blog Entries: 1
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Help with 'if Request.Form' on form

Code: Select all
If Request.Form("HomeNumber") = "" And Request.Form("MobileNumber") = "" Then
 strErrorMessage = strErrorMessage & "<p>Please enter one contact number.</p>"
End If
__________________
Diego - SEO Consultant London (My Blog | Fight Me)
jQuery: Star Rating - Multiple File Upload - FCKEditor/Codepress
Before we work on artificial intelligence why don't we do something about natural stupidity?
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 21st, 2008, 14:01   #3 (permalink)
Up'n'Coming Member
 
Join Date: Jan 2006
Location: Belfast
Posts: 57
Re: Help with 'if Request.Form' on form

that is fantastic - many thanks for that!!!
sing2trees is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding / Showing form fields based on previous form input John Alexander Hopper PHP Forum 1 Mar 10th, 2008 11:30
form variable within an iframe component of a form kissfreaque PHP Forum 3 Feb 29th, 2008 13:06
form variable within an iframe component of a form kissfreaque JavaScript Forum 5 Feb 29th, 2008 11:57
ASP form to check weather a form value is already in the database Andrew1986 ASP Forum 3 Oct 25th, 2007 08:23
request.form fails ppetree ASP Forum 1 Mar 15th, 2007 11:19



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 20:04.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59