Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Forms
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2005, 07:55 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nikhil.deshmukh
Default how to restrict the user to submit the special cha

I CANT ABLE TO MAKE IT OUT WITH THIS


how to restrict the user to submit the special character is a form
for e.g

login name : ''''''michel''''''
first name : michel
last name : deshmukh
country : %^australia^%
state : <><>Maharastra<><>
City : )-(Thane)-(

Regards
Nikhil

Regards
Nikhil
 
Old January 11th, 2005, 10:06 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

   You can check with

var st=frm1.txtname.value;
var len=st.length;
for(i=0;i<len;i++){
  ch=st.charCodeAt(i);
  if(!((ch>=65 && ch<=90)||(ch>=97 && ch<=122) || ch==32 || ch==46)){
    alert("Invalid Data");
    return false;
  }
}

This will allow only alphabets(upper and lower), space, and dot(.)


----------
Rajani






Similar Threads
Thread Thread Starter Forum Replies Last Post
Restrict the user not to direct download rylemer Classic ASP Basics 8 December 15th, 2010 02:25 AM
How I can restrict desktop user to access some res anjanmaity General .NET 1 June 27th, 2008 01:40 PM
Forms: Restrict user selection - How? cdplayer Classic ASP Basics 2 February 29th, 2004 03:37 AM
Login user & restrict access lucian Dreamweaver (all versions) 5 September 7th, 2003 12:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.