|
-
Jun 2nd, 2005, 03:17 PM
#1
Thread Starter
Fanatic Member
Disable the print button
Is there a way to disable the print button, and the file --> Print feature when one of my web page loads?
Thanks
-
Jun 2nd, 2005, 03:21 PM
#2
I wonder how many charact
Re: Disable the print button
No.
Other than popping a new browser window via javascript without the toolbar or menu bar.
-
Jun 2nd, 2005, 04:09 PM
#3
Thread Starter
Fanatic Member
Re: Disable the print button
How would I go about doing that? Currently I am using Response.Redirect("CrystalViewer.aspx"). How could I do this using java? Currently I know vb in .net fairly well but am not very proficient with java still.
Thanks
-
Jun 6th, 2005, 08:47 AM
#4
Thread Starter
Fanatic Member
Re: Disable the print button
-
Jun 7th, 2005, 06:26 AM
#5
I wonder how many charact
Re: Disable the print button
Its not foolproof mind you... depending on security settings and the individual browser, you may still find a print option.
Btw, its not JAVA, its javaScript... javaScript has more in common with vbScript than with Java.
Anyway...
Code:
window.open('crystalviewer.aspx','report','width=400,height=400,toolbar=no,menu=no,titlebar=no,status=no');
-
Jun 7th, 2005, 08:15 AM
#6
Thread Starter
Fanatic Member
Re: Disable the print button
nemaroller, thanks for you help so far.
I tried to create a function that I call from my code behind but it is causing an error. Here is the code.
VB Code:
<script language="javascript" type="text/javascript">
function ReportOpen
{window.open('crystalviewer.aspx', 'Report', 'width=400, height=400, toolbar=no, menu=no, titlebar=no status=no');}</script>
Any ideas on what I'm doing wrong?
Thanks
Last edited by indydavid32; Jun 7th, 2005 at 08:20 AM.
David Wilhelm
-
Jun 7th, 2005, 08:23 AM
#7
I wonder how many charact
Re: Disable the print button
Code:
<script language="javascript" type="text/javascript">
function ReportOpen()
{
window.open('crystalviewer.aspx', 'Report', 'width=400, height=400, toolbar=no, menu=no, titlebar=no status=no');
}
</script>
You're missing the parameters enclosure after your function name
().
-
Jun 7th, 2005, 08:26 AM
#8
Thread Starter
Fanatic Member
Re: Disable the print button
Looks like I might have the Function created properly, now I'm having a hard time getting the button to run the function.
Here is my revised function code.
VB Code:
<script language="javascript" type="text/javascript">
function ReportOpen()
{window.open('crystalviewer.aspx', 'P & L', 'Toolbar=no');}
</script>
This does not cause an error on the page. If it is right or not, I do not know.
Here is my code that does not run the funtion that I created.
VB Code:
Button1.Attributes.Add("onclick", "ReportOpen(); ")
-
Jun 7th, 2005, 10:42 AM
#9
Thread Starter
Fanatic Member
Re: Disable the print button
Yea, I figured that out right after I sent the post. I still can't get it to open the report though...
VB Code:
Button1.Attributes.Add("onclick", "ReportOpen(); ")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|