473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
2 2558
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

72
by: Stephen Poley | last post by:
I have quite often (as have probably many of you) come across HTML forms with irritating bits of Javascript attached. The last straw on this particular camel's back was a large form I was asked to...
2
by: webbedfeet | last post by:
Hi I hope someone can help me. I have a client side form validation script which works perfectly in IE but clicking "Submit" in Mozilla does nothing - the form won't submit. Is there something I...
1
by: Andy Kasotia | last post by:
I have an ASP UI with VB Dll as a COM object that access the DB2 Database. I have a "Calculate" button on the ASP Page which when clicked does form validation (javascript) and submits the form...
13
by: Ian.Suttle | last post by:
I am have been researching this issue to no end, so any help would be very much appreciated. I have a page with form tags. Inside of the form tags is a panel that contains a user control. The...
1
by: Hong Hao | last post by:
Recently, I was trying to modify an existing aspx page when client-side validation on that page stopped working. I searched this group and the web in general and found that other people have had...
2
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of...
14
by: JNariss | last post by:
Hello, I am fairly new to asp and jscript and am now in the process of learning some form validation. I am taking one step at a time by validating each field and testing it before moving onto...
4
by: jedimasta | last post by:
Good evening all, I'm a relatively new to javascript, but I've been working with ColdFusion and PHP for years so I'm not necessarily ignorant, just stuck and frustrated. Using ColdFusion I'm...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.