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 04-07-2006, 01:39 PM   PM User | #1
andyc209
New Coder

 
Join Date: Jun 2002
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
andyc209 is an unknown quantity at this point
form validation

I have a form that I do not want to pass any values to a database until submit but I want it to show the current calculation total. i.e. if someone puts the number 1 in one field and 2 in another a 'read only' field shows the number 3 in it automatically.

that is easy enough but there are a few variables.

One field will be a postcode/zipcode and will add a value to the total based on the first 2 characters entered, say they add 'ab1 2xy' the ab bit means 3 is added to the running total. how can i make this work?

any help is appreciated
andyc209 is offline   Reply With Quote
Old 04-07-2006, 01:47 PM   PM User | #2
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
Use some string functions to get the first 2 characters.

Good luck;
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 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 01:33 PM.


Advertisement
Log in to turn off these ads.