Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2006, 06:03 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default A Challange for asp.net masters

Hi,
It may be possible that this is a very simple thing.But as I dont know, it may seem a challange to me.
The prob. is that
I want a script through which, I can disable copy paste in entire system when a site is open.
For example, http://www.targetpublishers.com
Once you open this site, you can not copy paste in even other applications.
Please let me know the feedback.
Thanks..

Savan
__________________
Savan
 
Old May 18th, 2006, 06:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You were saying??
Quote:
quote:Running Business More Efficiently...
   Target Publishers allows it's clients to connect with their customers in a whole new light.
   With the Growth in the internet and e-commerce, technology has revolutionized the way
   consumers evaluate, compare and choose products and services. Every day more and
   more consumers utilize our ever changing technology to conduct business. With Target
   Publishers expertise we understand the importance of staying ahead of your competition
   and can excel your sales and put you ahead of your industry.

   Whether you're looking for a fresh lead source, a customized mailing campaign or interested
   in optimizing your site; Target Publishers' expertise can help develop the right marketing tool
   to stimulate your business and deliver results. Come learn why we have become one of the
   top marketers and lead generators for financial institutions throughout North America.
    (Taken from the site you linked to)

Point is, you can try to make it harder for users not to copy stuff, and irritate the heck out of them, but you won't be a able to prevent it....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 18th, 2006, 12:33 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Couldn't agree with you more Imar.

Thought you had left the planet.

Richard

 
Old May 18th, 2006, 03:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Left the planet???

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 18th, 2006, 04:02 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

<script language="javascript">
document.onmousedown=disableclick
status="Right Click Disabled"
function disableclick(e) {
if( event.button==2 )
alert("Sorry Right Click has been disabled!");
return false;
}
</script>

 
Old May 18th, 2006, 04:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That only stops you from right-clicking which is *really* annoying. I always use the browser's Back menu item on the context menu for example, instead of the browser's back button. With your code, that option is gone, while I can still press Ctrl+A + Ctrl+C to select everything and then copy it. So, you frustrate your users without adding anything useful to stop determined people.

savan_thakkar: search this forum for a few other threads on this topic. You'll find them amusing to read, and you'll find some useful tips to accomplish what you want (including JavaScript that continuously copies data to the clipboard, overwriting whatever you may have copied there)

Is there any reason why you want people to stop copying your data?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 18th, 2006, 10:34 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

i know it's anoying.. just an example that it can be done to some extent. And yes ctrl-c will works...

 
Old May 24th, 2006, 03:44 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Yes Imar,
But you can see the Javascript for any website. Javascript and .css files can not be hidden. You can download javascript file (.js) from any site.
But I can not understand the issue with http://www.targetpublishers.com
It's right that it continuously overwriting the clipboard content with single whitespace.
But If it's a javscript, then we should be able to see the script.
One more thing,

If you see the source of the index page on site I mentioned, some scripts are :

document.write(unescape("%3C%53%43%52%49%50%54%20% 4C%41%4E%47%55%41%47%45%3D%22%4A%61%76%61%53%63%72 %69%70%74%22%3E%3C%21%2D%2D%0D%0A%68%70%5F%6F%6B%3 D%74%72%75%65%3B%66%75%6E%63%74%69%6F%6E%20%68%70% 5F%64%30%31%28%73%29%7B%69%66%28%21%68%70%5F%6F%6B %29%72%65%74%75%72%6E%3B%76%61%72%20%6F%3D%22%22%2 C%61%72%3D%6E%65%77%20%41%72%72%61%79%28%29%2C%6F% 73%3D%22%22%2C%69%63%3D%30%3B%66%6F%72%28%69%3D%30 %3B%69%3C%73%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%7 B%63%3D%73%2E%63%68%61%72%43%6F%64%65%41%74%28%69% 29%3B%69%66%28%63%3C%31%32%38%29%63%3D%63%5E%32%3B %6F%73%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%6 8%61%72%43%6F%64%65%28%63%29%3B%69%66%28%6F%73%2E% 6C%65%6E%67%74%68%3E%38%30%29%7B%61%72%5B%69%63%2B %2B%5D%3D%6F%73%3B%6F%73%3D%22%22%7D%7D%6F%3D%61%7 2%2E%6A%6F%69%6E%28%22%22%29%2B%6F%73%3B%64%6F%63% 75%6D%65%6E%74%2E%77%72%69%74%65%28%6F%29%7D%2F%2F %2D%2D%3E%3C%2F%53%43%52%49%50%54%3E"));

What is this?
I also dont understand what is "unescape"??
Please reply , if you know about it....
Thanks to all of you for you interest....

Savan
 
Old May 24th, 2006, 10:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't know exactly how they do it, because I never bothered to look. Like I said before, you can irritate users, but you can never prevent them from looking at the source. You need to look for other ways to protect your intellectual property.

That said, take the stuff you posted, put it inside a <script> block in an HTML page, and replace document.write with alert. You'll see some interesting stuff.

Is there any reason why you want people to stop copying your data?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 25th, 2006, 07:27 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Yes, there is a specific reason behind this stuff.
But does it really matter??
I just want the users not being able to copy and paste in entire system.
I searched for Javscript that continuously update the Clipboard.
But could not find anything.
Any feedback, please let me know.

THANKS...

Savan





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 answers in Professional ASP.NET 3.5 jminatel ASP.NET 3.5 Professionals 1 August 22nd, 2011 07:34 AM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.