Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > form validation javascript inside ASP ?

Reply
Thread Tools

form validation javascript inside ASP ?

 
 
megabyte
Guest
Posts: n/a
 
      10-12-2005
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.

 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      10-12-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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.
>



 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      10-17-2005
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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A form validation library with javascript validation Grigory Temchenko Python 0 12-28-2008 08:38 PM
javascript form validation - form action to another asp page iam247@gmail.com ASP General 7 08-20-2005 10:06 PM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven Javascript 3 05-13-2004 12:15 AM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven ASP General 3 05-13-2004 12:15 AM
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM



Advertisments