•
•
•
•
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 402,050 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 2,464 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: 1153 | Replies: 11 | Solved
![]() |
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 538
Reputation:
Rep Power: 2
Solved Threads: 53
hello..
read the following:
How to Disable 'View Source'
http://www.felgall.com/htmlt4.htm
http://www.encrypt-html.com/_disable_view_source.htm
http://en.allexperts.com/q/Javascrip...w-source-1.htm
http://www.15seconds.com/howto/pg000916.htm
read the following:
How to Disable 'View Source'
http://www.felgall.com/htmlt4.htm
http://www.encrypt-html.com/_disable_view_source.htm
http://en.allexperts.com/q/Javascrip...w-source-1.htm
http://www.15seconds.com/howto/pg000916.htm
Champions Are Not SuperNatural,They Just Fought For One More Second When Every One Else Quit...Some times That One Second Of Effort Gives You The VICTORY...
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 538
Reputation:
Rep Power: 2
Solved Threads: 53
For this I use onKeyDown event. See the following code
that disables CTRL C and CTRL V.
Note that this is not enough to prevent COPY/PASTE
in a text field, since the user can use CTRL INS, SHIFT INS
or simply use the context menu (right click on text field).
that disables CTRL C and CTRL V.
Note that this is not enough to prevent COPY/PASTE
in a text field, since the user can use CTRL INS, SHIFT INS
or simply use the context menu (right click on text field).
html Syntax (Toggle Plain Text)
<html> <head> <script language="javascript"> function onKeyDown() { // current pressed key var pressedKey = String.fromCharCode(event.keyCode).toLowerCase(); if (event.ctrlKey && (pressedKey == "c" || pressedKey == "v")) { // disable key press porcessing event.returnValue = false; } } // onKeyDown </script> </head> <body> <form name="aForm"> <input type="text" name="aText" onkeydown = "onKeyDown()"> </form> </body </html>
Last edited by Shanti Chepuru : 31 Days Ago at 2:00 am. Reason: used code tags
Champions Are Not SuperNatural,They Just Fought For One More Second When Every One Else Quit...Some times That One Second Of Effort Gives You The VICTORY...
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 538
Reputation:
Rep Power: 2
Solved Threads: 53
how to disable ctrl+c:
http://www.faqs.org/faqs/msdos-progr...ection-16.html
And
That shortcut is handled by the operating system. It never reaches the browser and so the browser has no opportunity to pass it to the web page.
IE only:
Add the following code to your BODY tag:
ondragstart="return false" onselectstart="return false"
http://www.faqs.org/faqs/msdos-progr...ection-16.html
And
That shortcut is handled by the operating system. It never reaches the browser and so the browser has no opportunity to pass it to the web page.
IE only:
Add the following code to your BODY tag:
ondragstart="return false" onselectstart="return false"
Champions Are Not SuperNatural,They Just Fought For One More Second When Every One Else Quit...Some times That One Second Of Effort Gives You The VICTORY...
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 538
Reputation:
Rep Power: 2
Solved Threads: 53
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,222
Reputation:
Rep Power: 10
Solved Threads: 270
•
•
Join Date: Feb 2008
Location: Gurgaon India
Posts: 103
Reputation:
Rep Power: 1
Solved Threads: 10
Shanti Chepuru
u done good work
u done good work
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
age amd avatar chips database dell development dos drivers economy enterprise firefox gpl graphics hardware ibm ibm. news intel intel ibm internet it linux medicine memory microsoft mozilla news open open source open-source opengl openoffice pc ps3 recession red hat russia software source sun super supercomputer supercomputing system technology trends ubuntu vista windows x86
- Previous Thread: Need Suggestion regarding Limiting text box size
- Next Thread: textarea with formatting





Linear Mode