-
Client Side scripting
Hello! I am fairly new to .NET. I am doing some client side scripting with VB script to validate user input (OnBlur). My problem is if close the page the validation script runs. I know back in VB6 I used to use somthing like If Not ActiveControl Is Text1.... then put in my code . This would keep the code from running if the user wanted to exit. Anyway to do this in my scripting code. How do I stop the code from running if the user wants out. Suggestion appreciated.
-
You might wanna explain a little of on what type of project is this. ASP.NET? Windows App?
-Cool Bizs
-
ASP.NET- I inherited a project which is mostly complete except for some user validations. I'm not familiar with Java scripting so I wanted to use vb script.
-
Which event that you use to trigger the validation?
-Cool Bizs
-
OnBlur, however, I am open for suggestions.
-
There are few other events that you can try out. The common one is not to validte the input until the submit button is clicked on. This way, user can fill up the form without any interruption and validation is down right when they click on the submit button.
Another one is to use the event that indicates the value of the control has changed. For example, ONCHANGE(), which is triggered only if user changes the value of the control.
Good Luck,
-Cool Bizs
-
Thanks Coolbiz! I'll give it a try.
Cubbie