User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,633 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,849 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2145 | Replies: 6
Join Date: Dec 2007
Posts: 352
Reputation: OmniX is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Whiz

Help Validation - Paste (Ctrl V)

  #1  
Jan 21st, 2008
I was helping a fellow daniweb user with validation for restricting output to only numerics.
Then another user said even it validates a user could copy and paste into the cell.
Now that has been annoying me and I have been trying to figure out a way to prevent this.

Any Ideas? Thanks, Regards X

<html>
<head>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> 
function Numbers(e) {
var cc = (e.which) ? e.which : event.keyCode;
if (cc > 47 && cc < 58) {
return true;
}
return false;
} 
</SCRIPT>
</head>
<body>
<form method="">
<input type="text" name="jtitle" onKeyPress="return Numbers(this)"
size="57">
</body>
</html>
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC