Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Form Validating
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Form Validating

 Post Reply Post Reply Page  12>
Author
maniva View Drop Down
Groupie
Groupie
Avatar

Joined: 04 April 2002
Location: Italy
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote maniva Quote  Post ReplyReply Direct Link To This Post Topic: Form Validating
    Posted: 08 March 2003 at 5:11pm

Dear Friends,
I've a form with some fields to be cheked.

I've a page to check the fields and then if all are ok then update or write a file.

My problem is that when a field is wrong I would like to display the form page with a message near the field wrong and the value into the rest without retype all the value.

I can do all the thing except to have the fields filled. 

Please Help.

Ivano Mangiarotti
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2003 at 6:45pm
Well if youn do the validation in asp then you need to do a postback of the form values, then setting the value to something like <input type="text" value="<%=Request("bla")>
Back to Top
maniva View Drop Down
Groupie
Groupie
Avatar

Joined: 04 April 2002
Location: Italy
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote maniva Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 8:29am

Thanks Michael,
but  How to do a postbak ?

Bye

Ivano Mangiarotti
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 10:03am
what I ment, after you posted to an asp page, did the validation now if there is an error you would do something like response.redirect "startpage?error......your parameters here" or you do it with an autosubmitted form. anyway, this is what I ment.
Back to Top
maniva View Drop Down
Groupie
Groupie
Avatar

Joined: 04 April 2002
Location: Italy
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote maniva Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 3:07pm

What I'm using now is exactly response.redirect whith the error code.
I can pass back the error type like 1 is wrong name 2 Insert code 3 .... Etc. But if I wont to allow the user to don't retype all the infoemation I dont wont to have a response.redirect 1Km long.

Do you know another way ?

Bye.

Ivano Mangiarotti
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 4:46pm

Well have the form again on the validation page with the values submitted loaded in the form again

Back to Top
maniva View Drop Down
Groupie
Groupie
Avatar

Joined: 04 April 2002
Location: Italy
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote maniva Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2003 at 2:16am
Sound good !

I will try
Ivano Mangiarotti
Back to Top
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2003 at 3:00am

Why not do it all in the original page - use javascript to validate the form. If validation fails, then display (alert) a message. If it passes, then submit the form.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.