Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-10-2006, 12:42 AM   PM User | #1
code blue
New Coder

 
Join Date: Apr 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
code blue is an unknown quantity at this point
form validation

Hi,

I'm in way over my head on a project here - i'm building a site for a regular client, who in the past have looked after all forms themselves. suddenly on this project they have just told us that we are to build an email form that needs to meet all sorts of criteria and also needs to use all sorts of javascript validation.

I've never had to do any of this before and the projects is already late!

is there anyone here who may be able to help? I have all the instructions they have supplied (it's just over my head) as well as some sample scripts.

The main instructions they have given are:

Please inform the developer that:

- the email needs to meet a specific format requirement (see attachment)
- Use JavaScript to control State/Postcode according to Country selection
- the length of “Manufacturing Date Code” should be 14
- Use JavaScript to validation data (e.g. all compulsory fields, home/work/mobile numbers, “number of faulty items within pack”) on client-site before sending the email. Note: although the attached sample code does both client-site and server-site validation, they need to review the code and implement good client-site JavaScript validation
- sample email should be sent to [email supplied]

I have created the form itsefl, i just have no idea how to apply the scripts they are asking for.

any help would be greatly appreciated
code blue is offline   Reply With Quote
Old 05-10-2006, 01:00 AM   PM User | #2
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
You should start by explaining your client the following:
1. Using mail protocol <form action="mailto:.... for form processing is the worst way to process the form. Not only this can not guarantee the validity of data, but gives the email address to every spam bot out there. After a few weeks trying to find a form entry among all the spam will be like looking for a needle in a haystack....
2. Javascript can not validate data. It can be disabled and any information can be sent on its way.
3. Proper way to do form processing is:
- client side scripting (javascript) provides form data verification and user convinience features - sparing the round trip to the server due to a typo or missing field.
- server side script that receives the data does the actual validation, and if everything is ok, storing the data or e-mailing it. This way you can assure both accuracy of the data and privacy of the e-mail address.
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 05-10-2006, 01:19 AM   PM User | #3
code blue
New Coder

 
Join Date: Apr 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
code blue is an unknown quantity at this point
thanks

thanks Vladdy,

unfortunately it's not up to me, the client has a number of sites that use this method for their contact forms. Even if it was up to me, i wouldn't be able to provide any other solution as i am merely a humble html/css designer and faint at the sight of anyhting that has variables

I have just found that this forum has a paid section wehre i can ask someone to do the job for me for a fee, i may have to resort to that (just have to ask the boss first). Normally i'd try to work it out myself, but i really just don't have the time at the moment and my head already hurts enough!

thanks for taking the time though...
code blue is offline   Reply With Quote
Old 05-10-2006, 01:34 AM   PM User | #4
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
I can quote the job for you if you like, as long as your client understands the consequences...
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 05-10-2006, 02:20 AM   PM User | #5
code blue
New Coder

 
Join Date: Apr 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
code blue is an unknown quantity at this point
thanks again Vladdy - i have just gone over it with my boss and he is going back to the client with some options at the moment.

I will certainly keep you in mind if we do need to get it done in the end.
code blue is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 08:42 AM.


Advertisement
Log in to turn off these ads.