SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old March 1st, 2005, 03:30 AM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
Form Error Trapping

I have a form that I need to add some advanced error trapping to. I need to this to make sure the form is filled out properly.
I would like to be pointed in the right direction on how to get started since it is rather complicated.
So here is what I have. I have 1 check box:

<input name="accrued_annual_leave" type="checkbox" value="AL">

And I have 5 inputs. They are:

<input class="date_entry_area" name="accrued_al_date_from" type="text" maxlength="10">
<input class="date_entry_area" name="accrued_al_date_to" type="text" maxlength="10">
<input class="time_entry_area" name="accrued_al_time_from" type="text" maxlength="5">
<input class="time_entry_area" name="accrued_al_time_to" type="text" maxlength="5">
<input class="total_entry_area" name="accrued_al_total_hours" type="text" maxlength="3">

What I want to do is the following. When trying to submit, if "AL" is checked, for it to check to make sure all 5 inputs have values inside. Then, for it to focus to the one that is empty. And so forth.

Then, if information is entered into any of those 5 inputs, for "AL" value to be changed to checked.

Any ideas?

Reply With Quote
  #2  
Old March 3rd, 2005, 01:13 PM
mikenco mikenco is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: UK
Posts: 62 mikenco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Form Error Trapping

Hi

I have similar principals explained here > http://javascript.internet.com/forms/

Reply With Quote
  #3  
Old March 3rd, 2005, 06:56 PM
Yian Yian is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: UK
Posts: 279 Yian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Form Error Trapping

I'd suggest using a server-side script for validating post data, it is much more secure.

Reply With Quote
  #4  
Old March 3rd, 2005, 07:17 PM
mikenco mikenco is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: UK
Posts: 62 mikenco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Form Error Trapping

I think he means he just wants some simple validating doing BEFORE submission.. using, for example, onChange= in the text fields.

IE: <input name="sd1" type="text" id="sd1" size="6" onChange="docalcs()">

That way, it is even more secure because it isn't travelling backwards and forwards with error messages. And the form only needs to be submitted once.

Reply With Quote
  #5  
Old March 4th, 2005, 08:07 PM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
RE: Form Error Trapping

Cool. Found several good pieces of code in the page you suggested.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Form Error Trapping


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 4 hosted by Hostway