Solved

textbox validation

Posted on 1998-10-30
2
198 Views
Last Modified: 2013-12-25
hi,
I've a form which contains four textboxes.i have to validate the textboxes before i click the submit button.
i have written the code in the onclick()event of the submit button.Though i'm able to validate this but the form gets posted to the asp i've mentioned.In javascript i heard its possible but i want this to be done in vbscript.please let me know with code.thanx.
0
Comment
Question by:rvsamuel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1856041
make the submit button like this:

<input type="submit" onClick="return Validate()">


The function Validate() should then return "true" or "false".
If true then the form is submitted, if false, then it's not submitted.

Why use VBScript for this ? Or do you mean server-side script (ASP) ?

0
 

Author Comment

by:rvsamuel
ID: 1856042
no i want the validations to be done at the client's side thats why i want it in vbscript.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question