473,756 Members | 2,996 Online
Bytes | Software Development & Data Engineering Community
+ 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 1973
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
1489
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 error while processing inside the application. I have to present the numeric control to the user so as to enter any value he likes "except any text or invalid characters" ( allow numeric values only) Please help. Thanks in advance.
10
2830
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 decimal point? I can restrict the maxlength to 5, but that wouldn't stop the user from type in 1.987. tia
5
3158
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? Existing code would be appreciated! In other words, I'd like to right click on a form text box and add the value stored in the clipboard to the existing value which is in the text box.
8
1672
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 will then be used to perform weighted searches on the keywords and text of multiple MSWord documents. How might this best be accomplished? Should I perform Full Text Searches on the Word files or store the data in a database (by coping and pasting...
2
3691
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 old Java client/server data maintenance program to the web - the main display is in a grid format, which allows the user to select multiple rows and edit them in a new grid, which processes each grid line individually and validates and saves the...
2
1776
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 operation or am I on a wild goose chase here? There are a lot of examples of pasting text into an HTML form using the TextArea.createTextRange() method, but so far I'm coming up with nothing on image data. Any help will be appreciated. Thanks. ...
20
3564
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
2334
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 and provides a mechanism to encode/decode them. However I can't seem to get it to work: .... <asp:textbox id=txtDescription style="Z-INDEX: 102; LEFT: 111px; POSITION: absolute; TOP: 124px" tabIndex=29 runat="server" onblur="return...
2
2132
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 of invalid data on the text box while it should allow numeric strting to be pasted.
1
4794
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 images (.jpg) of items and text that describes characteristcs about the items. The images are currently in a MS Word table. I would like to simply convert the table into an SQL database, but seems not possible. Failing that, I would like to copy...
0
9431
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9689
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
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 we have to send another system
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.