View Single Post
  #21 (permalink)  
Old June 22nd, 2004, 04:47 AM
happygv happygv is offline
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Hi qazi_nomi,

So what have you decided to stick with finally? You still want to go for session variables or do it with Javascript?

Let me explain you on that.
With javascript solution...
You can post your form data to confirm.asp and there you can validate and if not okay with the data you can give the control back to registration.asp. using history.back or history.go(-1), but what you would be missing in this way of doing is, you CANNOT let the registration page or the user know that what went wrong with the data and user would go clueless and wondering why you let him comeback to registration page. and you cannot achive what you have asked in your original post. i'd like to see the same form again, but with the wrong field turned red and empty, and the proper filled field should contain their data
Is that what you want to do?

With Session variables...
You can store all the registration data that are posted to confirm.asp in to session variables and use them for validation, if not okay with the data you can still redirect to registration.asp and populate the value on form from the session variables. But there are other factors too. As the other gentlemen suggested here, it would affect the performance of the site when the hit rate is high on the site. And also the session variables are having their own expriy limit of 20 mins by default. Imagine when the user has to attend some other work in the mid of filling the registration form, and comes back to continue the filling the form after 25 mins, by then his session would have been expired and he would really be frustrated to know that he lost all the data and had to fill them again. I am sure, this is not the right approach when you design something that is not user friendly and he would really give up registering to your site. I have never come across anyone choosing this method for validation form data. Also if you are comfortable with going about session variables and do this for all forms in your entire site, I am sure that is going to toss up your web site with slow performance and even crash sometimes.

One can reach an Island by different means.
1) by Flight
2) by Ship
3) by swimming

I prefer going by flight. Some may prefer going by Ship. Do you prefer SWIMMING to reach there? May be you like to have adventure and thrill in that, but beware of Sharks and Whales on your way.

The call is yours.
Hope that explains.

-Vijay G
Strive for Perfection
Reply With Quote