467,892 Members | 1,856 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,892 developers. It's quick & easy.

form validation javascript inside ASP ?

Hello;

I have an ASP application which gathers information to put in a
database via some forms - I would like to do the form validation
(making sure some fields are not empty) with a Javascript script inside
the ASP file - what is the syntax for doing this? Usually I would place
the javascript inside the <head> tags, but ASP files don't have
those...

Thanks for any help.

Eric.

Oct 12 '05 #1
  • viewed: 2383
Share:
2 Replies
If you want the validation done on the client side you would include the
script in the html output (inside the <head> tags if you like).

If you want server-side validation (and you should always do it server-side
in addition to any client-side validation) then put the code where ever you
need it if you are using jscript in the ASP page. If you are using VBScript
in the page then you probably want to use VBScript for the server-side
validation as well.

--
--Mark Schupp
"megabyte" <ep*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello;

I have an ASP application which gathers information to put in a
database via some forms - I would like to do the form validation
(making sure some fields are not empty) with a Javascript script inside
the ASP file - what is the syntax for doing this? Usually I would place
the javascript inside the <head> tags, but ASP files don't have
those...

Thanks for any help.

Eric.

Oct 12 '05 #2
Some JavaScript validation links (and they work fine on ASP pages just
as they do on regular HTML pages):

Javascript Field Validations -- Client Side Scripting by Nannette
Thacker - 8/19/1999
http://www.shiningstar.net/articles/...vascriptvalida
tions.asp?ID=AW

Form Validation Using Javascript - 9/19/1998
http://www.4guysfromrolla.com/webtech/091998-1.shtml
Good tips such as saving JavaScript functions in a file called
DataValidation.js and including this in pages that need this.
JavaScript functions.

WebDaily: Your daily source for Web Technology Tips and Tricks! -
10/27/1998
http://www.4guysfromrolla.com/webtech/102798-1.shtml
Just checks if fields filled in.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips

<<
I have an ASP application which gathers information to put in a database
via some forms - I would like to do the form validation (making sure
some fields are not empty) with a Javascript script inside the ASP file
- what is the syntax for doing this? Usually I would place the
javascript inside the <head> tags, but ASP files don't have
those...


*** Sent via Developersdex http://www.developersdex.com ***
Oct 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

72 posts views Thread by Stephen Poley | last post: by
1 post views Thread by Andy Kasotia | last post: by
13 posts views Thread by Ian.Suttle | last post: by
1 post views Thread by Hong Hao | last post: by
14 posts views Thread by JNariss | last post: by
4 posts views Thread by jedimasta | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.