Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old January 9th, 2002, 08:49 AM
Roxy Roxy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 22 Roxy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 22 sec
Reputation Power: 0
Form Validation

I'm using the following to validate that an entry has been made before sending form values using mailto. However, this sends the email whether the data is valid or not. This function is called form the onClick event of the Submit button - I must need to replace the 1st 'return' with another command?
Any thoughts?
thanks

function validateIt()
{
var txtText
txtText = document.request.company.value;
if(txtText.length < 1) /
{
alert("Must enter a value");
txtText.focus;
return;
}
/* input ok */
return;
}

Reply With Quote
  #2  
Old January 9th, 2002, 09:51 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,707 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 2 h 38 m 50 sec
Reputation Power: 259
Isn't it a javascript (or ECMASCRIPT)? If this is the case, post it to the appropriate forum, and notice that data validation is better done on server side!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Form Validation


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway