•
•
•
•
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 456,470 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,806 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: 2126 | Replies: 11 | Solved
![]() |
| |
•
•
Join Date: Jul 2008
Location: Sweet India
Posts: 977
Reputation:
Rep Power: 2
Solved Threads: 90
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
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Jul 2008
Location: Sweet India
Posts: 977
Reputation:
Rep Power: 2
Solved Threads: 90
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 : Aug 5th, 2008 at 3:00 am. Reason: used code tags
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Jul 2008
Location: Sweet India
Posts: 977
Reputation:
Rep Power: 2
Solved Threads: 90
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"
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Jul 2008
Location: Sweet India
Posts: 977
Reputation:
Rep Power: 2
Solved Threads: 90
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,628
Reputation:
Rep Power: 12
Solved Threads: 311
As long you do not provide pure HTML site nothing is as it seems in source view...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
Publilius Syrus
(~100 BC)
LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
•
•
Join Date: Feb 2008
Location: Gurgaon India
Posts: 182
Reputation:
Rep Power: 1
Solved Threads: 15
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





Hybrid Mode