473,466 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

To restrict "pasting" data on a text-field.

10 New Member
Hi ,

Is it possible to restrict "pasting" any data in a text box,through keyboard(Ctrl-p) and through mouse??Can anybody help in dis

WarmRegards
jk
Jan 9 '08 #1
7 1957
gits
5,390 Recognized Expert Moderator Expert
hi ...

besides that is a bad idea spoken in terms of usability ... you may handle the key-events and the oncontextmenu event for this purpose ...

kind regards
Jan 9 '08 #2
jayakrishnanav
10 New Member
hi ...

besides that is a bad idea spoken in terms of usability ... you may handle the key-events and the oncontextmenu event for this purpose ...

kind regards
hi,

Actually itz a calendar field.So calendar is placed near to the textbox,so use can chose de date from it.So dere z no need for pasting any data,know?
tatz y i askd..


jk
Jan 9 '08 #3
gits
5,390 Recognized Expert Moderator Expert
but should he be able to write it in? ... in case he shouldn't then simply set the readonly-attribute to that node ...

kind regards
Jan 9 '08 #4
jayakrishnanav
10 New Member
but should he be able to write it in? ... in case he shouldn't then simply set the readonly-attribute to that node ...

kind regards
no! he cant write in it!but,if the user has once entered the date through calendar and then he want to clear it..he cant delete know,if v gv readonly for tat attribute?
Jan 9 '08 #5
gits
5,390 Recognized Expert Moderator Expert
you could add a clear button or something like that. what does ... 'if v gv' ... mean?

kind regards
Jan 9 '08 #6
jayakrishnanav
10 New Member
you could add a clear button or something like that. what does ... 'if v gv' ... mean?

kind regards
ok....i mean "if we give"...sorry!!
from now onwards wont use any short forms..:-)
if a text field is set a disabled="true" in jsp,later
can we clear that textfield using any function in js ?
Jan 9 '08 #7
gits
5,390 Recognized Expert Moderator Expert
of course .... you may set the value to an empty one:

Expand|Select|Wrap|Line Numbers
  1. text_node_ref.value = '';
kind regards
Jan 10 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: jinu | last post by:
Hello, Facing a problem where I use a numericupdown control in vb.net for recieving an input. But user can copy a "text" using mouse and paste into the numericupdown control. This will lead to...
10
by: Rogue Chameleon | last post by:
Hi all I have a input filed of type "textbox" into which I am expecting to get currency values (ie. 199.99). Is there a way that I can restrict the user to only entering 2 values after the...
5
by: Add and Paste | last post by:
Dear Access developers, I have a lot of cut and pasting to do from Excel to an Access form. But instead of just pasting, I want to "add then paste" the value. Does anybody have a way to do this?...
8
by: DQ dont quit | last post by:
I'm currently working on a ASP.Net / C# / SQL 2000 project that involves the entering of keywords, that a web user enters, and then searching MSWord documents for those words. This information...
2
by: Questman | last post by:
Good afternoon, Does anyone have any code that implements, or approaches implementing, a cross-browser DHTML/JS solution to provide an Excel-like Grid on a web page - I'm trying to convert an...
2
by: Corey Ellsworth | last post by:
I am looking for a way to "POST" image data that is copied to the clipboard on the client computer to an ASPX page using JScript on the front-end and VB.NET on the backend. Is this a feasible...
20
by: liujiaping | last post by:
I'm confused about the program below: int main(int argc, char* argv) { char str1 = "abc"; char str2 = "abc"; const char str3 = "abc"; const char str4 = "abc"; const char* str5 = "abc";
6
by: teddysnips | last post by:
In my application I need to allow users to cut 'n' paste stuff from various sources, some of which might include dodgy characters such as "<". Natch, IE interprets these as potentially dangerous...
2
by: Chinmay1985 | last post by:
Hi, Currently we have a text box which takes only Numbers. but using control keys and mouse we are able to paste string which has invalid data (i.e. !!@nmbdnm). So how can I restrict the pasting...
1
by: aeconsta | last post by:
I want to add images to my database by copying and pasting the image. I am using MS SQL Server Express 2008 and MS VB Express 2008. I want to create a simple program that displays data including...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.