i need a code to disable user print and save as.if there is any javascript plz help me.last 1 month i need this code.the end user never save my pages and print my pages including text image
15 74682
i need disable save as javascript
Hi Baranitharan,
i have seen right click disable kind of codes around.. if you need a faster solution, you try looking in Google.com.. or else you can post your code segment on your next post and we will help you to validate your code.. take care..
Hi Baranitharan,
check out the below code.. hope it helps you to get started with.. good luck my fren.. :)
no right click for images.. -
<script language="JavaScript">
-
<!--
-
function noway(go) { if
-
(document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers)
-
{ if (go.which == 3) { alert(popup); return false; } } } if (document.layers)
-
{ document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway;
-
// -->
-
</script>
-
no right click for source code.. -
<script language="JavaScript1.1">
-
<!--
-
var debug = true; function
-
right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which
-
== 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer'
-
&& (event.button == 2 || event.button == 3)) { alert('This Page is fully
-
protected!'); return false; } return true; } document.onmousedown=right; if (document.layers)
-
window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right;
-
//-->
-
</script>
-
Disable Copy and Paste.
Add the following html code to your BODY tag:
Here is how your BODY tag may look once implimented: -
<body bgcolor="#FFFFFF" ondragstart="return false" onselectstart="return false">
-
-
ondragstart="return false" onselectstart="return false"
-
Banfa 9,065
Expert Mod 8TB
baranitharan - I do not believe there is anyway to do what you want, File -> Save As and File -> Print are functions of the browser that you have no control over as they are not part of any web standard (i.e. HTML, Javascript, CSS etc). They are things that the browser designers put in because they thought they might be useful.
sashi - the things you suggest are worst than useless IMO because they are not deterant to someone who knows what they are doing, all the do is make a site a little more irritating to use.
If you are trying to prevent someone copying something you are publishing on the web then there is only 1 answer, don't publish it. Remember just by displaying it in there browser most people already have a copy of you item in there browser cache which is easy enough to access.
thanks sashi. i am try you sample code...
Hi Baranitharan,
check out the below code.. hope it helps you to get started with.. good luck my fren.. :)
no right click for images.. -
<script language="JavaScript">
-
<!--
-
function noway(go) { if
-
(document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers)
-
{ if (go.which == 3) { alert(popup); return false; } } } if (document.layers)
-
{ document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway;
-
// -->
-
</script>
-
no right click for source code.. -
<script language="JavaScript1.1">
-
<!--
-
var debug = true; function
-
right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which
-
== 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer'
-
&& (event.button == 2 || event.button == 3)) { alert('This Page is fully
-
protected!'); return false; } return true; } document.onmousedown=right; if (document.layers)
-
window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right;
-
//-->
-
</script>
-
Disable Copy and Paste.
Add the following html code to your BODY tag:
Here is how your BODY tag may look once implimented: -
<body bgcolor="#FFFFFF" ondragstart="return false" onselectstart="return false">
-
-
ondragstart="return false" onselectstart="return false"
-
Welcome back, baranitharan. Whoa! 15 months after your original post!
thanks sashi. i am try you sample code...
Listen to the advice from Banfa. JavaScript cannot disable these things. What you should consider is why you want to do this in the first place. If it's to protect images, just watermark them. Everything appears in the cache anyway, so disabling Save As has no effect on someone that is determined enough.
How to close open/save/cancel dialog box in IE 8 when user click on some button.
please sugest its urgent.
So you have a dialog open and you want to close it by clicking a button? or did you want something else?
i need to bypass that open /save/cancel when i will click to open pdf in my web application how can i do that using some code or somewhere else./
If it's a browser functionality, you'll have to check the browser settings.
Do you want the PDF file to display in the browser without a dialog box or do you want to force a download?
basically i have an application which will generate a consolidate pdf for all the user information at last page when user click on a button, i m calling window.open method to open that pdf in a new window,
it is working fine in IE 6 and IE 7
but in iE 8 its is opening addition popup that is open/save/cancel ,i want to avoid that using some code not using browser setting.
gits 5,390
Expert Mod 4TB
you might try to add a Content Disposition header with inline and filename before sending the pdf from the server ...
kind regards
can u just tell me where i need to put this code.. in java file or in JSP...
gits 5,390
Expert Mod 4TB
you will probably have a line where the pdf is send/printed in your code? probably it will be located in a jsp-page? ...
I think I saw the solution in the MSDN Developer center, but I can't recall what the subject was under.
-Tsu
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Barry |
last post by:
Hello,
I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it...
|
by: scoimbra |
last post by:
Hello there,
I have a report in an access database that always prints to the MS
Image Writer. I have to do this several times a day.
Does any of you know how to implement a VB code to print...
|
by: standish22 |
last post by:
want to open a word document stored in my database.
What I do is save the document locally, and then open a new winform
that has the WebBrowser Control on it and navigate to that new file.
...
|
by: Michelle Anderson |
last post by:
Hi,
I have this code so it will ask user if they want to save if they click on the "close" button. But some how it also pops up the message when I click on the save button. Is there a way to...
|
by: sqldude |
last post by:
How can I disable the print preview while printing an excel file from C# code?
Thanks.
|
by: Virtual_X |
last post by:
As in IEEE754
double consist of
sign bit
11 bits for exponent
52 bits for fraction
i write this code to print double parts as it explained in ieee754
i want to know if the code contain any...
|
by: Saray |
last post by:
Hi,
Can you please give me a sample code to print the data to the printer from the excel sheet.
Thanks in advance
Saray
|
by: flip345 |
last post by:
dear all,
I want to disable print button in case text box are empty
please advise because i am prety unfamiliar with visual basic
please please
thanks
|
by: Jogendra Singh |
last post by:
How we can Disable browser save as Button ??????
Plz help me ???????/
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
| |