geohix
asked on
Need to hide Menu, Tool, and Address bar when opening pdf document in IFrame
Is there a way to hide the toolbar, menu bar, and address bar at the top of the page when opening a pdf document in a new window. Or is there a way to prevent the user from printing the pdf from the menu or tool bar. What is happening is the user are pressing the print button on the tool bar and they get a blank document, when they should instead be pressing the print button on the adobe tool bar. I have the pdf's opening in an IFrame.
Thanks
Thanks
In the example I posted, I didn't define any 'features' other than width or height, so the window lacks scrollbars, menubars, etc
this link (in place of the one in my previous example) would show the page with all the extras (for your reference)
<a href="#" onClick="openBrWindow('pdf file.pdf', 'pdffile', 'toolbar=y es,locatio n=yes,stat us=yes,men ubar=yes,s crollbars= yes,resiza ble=yes,wi dth=400,he ight=400') ">open pdf doc</a>
<a href="#" onClick="openBrWindow('pdf
how is that? 6 min response! lol
;-) hope it helped
;-) hope it helped
hold on - why are you opening them in an IFrame?
ASKER
Here is my main page that I call the link from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/HR.dw t" codeOutsideHTMLIsLocked="f alse" -->
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Kenwal Steel Corporation Intranet</title>
<!-- InstanceEndEditable --><link rel="stylesheet" href="emx_nav_left.css" type="text/css">
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 9;
//menu constructor
function menu(allitems,thisitem,sta rtstate){
callname= "gl"+thisitem;
divname="subglobal"+thisit em;
this.numberofmenuitems = 9;
this.caller = document.getElementById(ca llname);
this.thediv = document.getElementById(di vname);
this.thediv.style.visibili ty = startstate;
}
//menu methods
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility=" hidden";
}
theobj.thediv.style.visibi lity="visi ble";
}
function closesubnav(event){
if ((event.clientY <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thedi v');
shutdiv.style.visibility=' hidden';
}
}
}
// -->
</script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
-->
</style>
</head>
<body onmousemove="closesubnav(e vent);">
<div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
<div id="masthead">
<h1 id="siteName"> </h1>
<div id="utility">
<div align="right"><a href="Main.htm">Home</a> <!--| <a href="#">Accounting</a> -->
| <a href="hr_home.htm">Human Resources</a> <!--| <a href="#">ISO</a>
| <a href="#">Outside Sales</a> | <a href="#">Pickler</a> | <a href="#">Production</a> -->
| <a href="http://fax/rightfax">Right Fax Login</a> <!--| <a href="#">Quality Control</a>-->
| <a href="Support_home.htm">Su pport</a>
</div>
</div>
<div id="globalNav">
<img alt="" src="gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="glbnav_right.gif" height="32" width="4" id="gnr">
<div id="globalLink">
<a href="hr_policy/policymanu al.htm" id="gl1" class="glink" onmouseover="ehandler(even t,menuitem 1);">Polic y and Procedures </a>
<a href="#" id="gl2" class="glink" onmouseover="ehandler(even t,menuitem 2);">Forms
</a><a href="#" id="gl3" class="glink" onmouseover="ehandler(even t,menuitem 3);">Insur ance Info
</a><a href="#" id="gl4" class="glink" onmouseover="ehandler(even t,menuitem 4);">Benef its
</a><a href="#" id="gl5" class="glink" onmouseover="ehandler(even t,menuitem 5);">Datab ases</a>
<a href="#" id="gl6" class="glink" onmouseover="ehandler(even t,menuitem 6);">
</a><a href="#" id="gl7" class="glink" onmouseover="ehandler(even t,menuitem 7);">
</a><a href="#" id="gl8" class="glink" onmouseover="ehandler(even t,menuitem 8);">
</a><a href="#" id="gl9" class="glink" onmouseover="ehandler(even t,menuitem 9);">
</a>
</div>
<!--end globalLinks-->
<form id="search" action="">
<input name="searchFor" type="text" size="10">
<a href="">search</a>
</form>
</div>
<!-- end globalNav -->
<div id="subglobal1" class="subglobalNav">
<!-- <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link
</a> | <a href="#">Link</a> | <a href="#">Link </a> | <a href="#">Link
</a> | <a href="#">Training</a> -->
</div>
<div id="subglobal2" class="subglobalNav">
<a href="hr_forms/benefit_for ms/benefit _main_form .htm">Bene fit Forms</a> | <a href="hr_forms/payroll_for ms/payroll _form_main .htm">Payr oll Forms </a> | <a href="hr_forms/insurance_f orms/insur ance_form_ main.htm"> Insurance Forms</a>| <a href="hr_forms/misc_forms/ misc_main. htm">Misc. Forms</a>
</div>
<div id="subglobal3" class="subglobalNav">
<a href="hr_insurance_info/ma jor_medica l_main.htm ">Major Medical</a> | <a href="hr_insurance_info/De ntal.htm"> Dental</a> | <a href="hr_insurance_info/vi sion.htm"> Vision</a> | <a href="hr_insurance_info/di sability_i ns.htm">Di sability & Life/ADD Insurance</a> | <a href="hr_insurance_info/su pplemental _insurance .htm">Supp lemental Insurance</a>
</div>
<div id="subglobal4" class="subglobalNav">
<a href="hr_benefit/supplier_ discount.h tm">Auto Supplier Discount</a> | <a href="hr_benefit/401k.htm" > 401K</a> | <a href="hr_benefit/pto.htm"> Paid Time Off</a> | <a href="hr_benefit/edu_reim. htm">Educa tion Reimbursement</a>
| <a href="hr_benefit/bond.htm" >Bonds</a> | <a href="hr_benefit/flexible_ spending.h tm">Flexib le Spending</a>
</div>
<div id="subglobal5" class="subglobalNav">
<a href="#">Training</a> | <a href="#">Report of Injury</a> | <a href="#">Out of class</a>
</div>
<div id="subglobal6" class="subglobalNav">
<a href="#">Link</a> | <a href="#">Link</a>
</div>
<div id="subglobal7" class="subglobalNav">
<a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
link</a> | <a href="#">subglobal7 link</a>
</div>
<div id="subglobal8" class="subglobalNav">
<a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
link</a> | <a href="#">subglobal8 link</a>
</div>
<div id="subglobal9" class="subglobalNav">
<a href="#">subglobal9 link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9
link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9
link</a> | <a href="#">subglobal9 link</a>
</div>
<!-- end masthead -->
<div id="pagecell1">
<!--pagecell1-->
<img alt="" src="tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="tr_curve_white.gif" height="6" width="6" id="tr">
<div id="breadCrumb">
</div>
<!-- InstanceBeginEditable name="Body" -->
<div id="pageName">
<h2>Human Resources </h2>
<p> </p>
<p>KENWAL STEEL CORP. is an employee-oriented organization, that emphasizes our people as the source of our strength. In keeping with that emphasis, we listen to you and try to balance your concerns against the business evnivronment in which all of us must compete.</p>
<p>The Company's objective is to offer competitive pay and benefits; relate increases in pay to job performance; and profide a safe and healthful work environment </p>
<h1 align="center"><a href="#">Upcoming Training</a></h1>
<h1 align="center"> </h1>
<h1 align="center"><a href="#">Events</a></h1>
</div>
<!-- InstanceEndEditable -->
<div id="siteInfo">
<a href="About.htm">About Us</a> | <a href="#">Site
Map</a> | <a href="#">Privacy Policy</a> | <a href="mailto: kd_network@kenwal.com">Con tact Us</a> | ©2004
Kenwal Steel Corp
</div>
</div>
<!--end pagecell1-->
<br>
<script type="text/javascript">
<!--
var menuitem1 = new menu(9,1,"hidden");
var menuitem2 = new menu(9,2,"hidden");
var menuitem3 = new menu(9,3,"hidden");
var menuitem4 = new menu(9,4,"hidden");
var menuitem5 = new menu(9,5,"hidden");
var menuitem6 = new menu(9,6,"hidden");
var menuitem7 = new menu(9,7,"hidden");
var menuitem8 = new menu(9,8,"hidden");
var menuitem9 = new menu(9,9,"hidden");
// -->
</script>
</body>
<!-- InstanceEnd --></html>
The link that I am looking at in particular is called Policy and Procedures. Looking at your response I mis-stated, I don't want to open in a new window, I want a particular page that has an pdf file in IFrame not to have the bars at the top or at minimum the print options... Here is the page that I don't want the bars on...
It is all the same except in the body I have this command
<!-- InstanceBeginEditable name="Body" -->
<div id="pageName">
<IFRAME SRC="dearpol.pdf" WIDTH="100%" HEIGHT="600"></IFRAME>
</div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/HR.dw
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Kenwal Steel Corporation Intranet</title>
<!-- InstanceEndEditable --><link rel="stylesheet" href="emx_nav_left.css" type="text/css">
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 9;
//menu constructor
function menu(allitems,thisitem,sta
callname= "gl"+thisitem;
divname="subglobal"+thisit
this.numberofmenuitems = 9;
this.caller = document.getElementById(ca
this.thediv = document.getElementById(di
this.thediv.style.visibili
}
//menu methods
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+i+".thediv");
shutdiv.style.visibility="
}
theobj.thediv.style.visibi
}
function closesubnav(event){
if ((event.clientY <48)||(event.clientY > 107)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+i+'.thedi
shutdiv.style.visibility='
}
}
}
// -->
</script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
-->
</style>
</head>
<body onmousemove="closesubnav(e
<div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
<div id="masthead">
<h1 id="siteName"> </h1>
<div id="utility">
<div align="right"><a href="Main.htm">Home</a> <!--| <a href="#">Accounting</a> -->
| <a href="hr_home.htm">Human Resources</a> <!--| <a href="#">ISO</a>
| <a href="#">Outside Sales</a> | <a href="#">Pickler</a> | <a href="#">Production</a> -->
| <a href="http://fax/rightfax">Right Fax Login</a> <!--| <a href="#">Quality Control</a>-->
| <a href="Support_home.htm">Su
</div>
</div>
<div id="globalNav">
<img alt="" src="gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="glbnav_right.gif" height="32" width="4" id="gnr">
<div id="globalLink">
<a href="hr_policy/policymanu
<a href="#" id="gl2" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl3" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl4" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl5" class="glink" onmouseover="ehandler(even
<a href="#" id="gl6" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl7" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl8" class="glink" onmouseover="ehandler(even
</a><a href="#" id="gl9" class="glink" onmouseover="ehandler(even
</a>
</div>
<!--end globalLinks-->
<form id="search" action="">
<input name="searchFor" type="text" size="10">
<a href="">search</a>
</form>
</div>
<!-- end globalNav -->
<div id="subglobal1" class="subglobalNav">
<!-- <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link
</a> | <a href="#">Link</a> | <a href="#">Link </a> | <a href="#">Link
</a> | <a href="#">Training</a> -->
</div>
<div id="subglobal2" class="subglobalNav">
<a href="hr_forms/benefit_for
</div>
<div id="subglobal3" class="subglobalNav">
<a href="hr_insurance_info/ma
</div>
<div id="subglobal4" class="subglobalNav">
<a href="hr_benefit/supplier_
| <a href="hr_benefit/bond.htm"
</div>
<div id="subglobal5" class="subglobalNav">
<a href="#">Training</a> | <a href="#">Report of Injury</a> | <a href="#">Out of class</a>
</div>
<div id="subglobal6" class="subglobalNav">
<a href="#">Link</a> | <a href="#">Link</a>
</div>
<div id="subglobal7" class="subglobalNav">
<a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7
link</a> | <a href="#">subglobal7 link</a>
</div>
<div id="subglobal8" class="subglobalNav">
<a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
link</a> | <a href="#">subglobal8 link</a>
</div>
<div id="subglobal9" class="subglobalNav">
<a href="#">subglobal9 link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9
link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9 link</a> | <a href="#">subglobal9
link</a> | <a href="#">subglobal9 link</a>
</div>
<!-- end masthead -->
<div id="pagecell1">
<!--pagecell1-->
<img alt="" src="tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="tr_curve_white.gif" height="6" width="6" id="tr">
<div id="breadCrumb">
</div>
<!-- InstanceBeginEditable name="Body" -->
<div id="pageName">
<h2>Human Resources </h2>
<p> </p>
<p>KENWAL STEEL CORP. is an employee-oriented organization, that emphasizes our people as the source of our strength. In keeping with that emphasis, we listen to you and try to balance your concerns against the business evnivronment in which all of us must compete.</p>
<p>The Company's objective is to offer competitive pay and benefits; relate increases in pay to job performance; and profide a safe and healthful work environment </p>
<h1 align="center"><a href="#">Upcoming Training</a></h1>
<h1 align="center"> </h1>
<h1 align="center"><a href="#">Events</a></h1>
</div>
<!-- InstanceEndEditable -->
<div id="siteInfo">
<a href="About.htm">About Us</a> | <a href="#">Site
Map</a> | <a href="#">Privacy Policy</a> | <a href="mailto: kd_network@kenwal.com">Con
Kenwal Steel Corp
</div>
</div>
<!--end pagecell1-->
<br>
<script type="text/javascript">
<!--
var menuitem1 = new menu(9,1,"hidden");
var menuitem2 = new menu(9,2,"hidden");
var menuitem3 = new menu(9,3,"hidden");
var menuitem4 = new menu(9,4,"hidden");
var menuitem5 = new menu(9,5,"hidden");
var menuitem6 = new menu(9,6,"hidden");
var menuitem7 = new menu(9,7,"hidden");
var menuitem8 = new menu(9,8,"hidden");
var menuitem9 = new menu(9,9,"hidden");
// -->
</script>
</body>
<!-- InstanceEnd --></html>
The link that I am looking at in particular is called Policy and Procedures. Looking at your response I mis-stated, I don't want to open in a new window, I want a particular page that has an pdf file in IFrame not to have the bars at the top or at minimum the print options... Here is the page that I don't want the bars on...
It is all the same except in the body I have this command
<!-- InstanceBeginEditable name="Body" -->
<div id="pageName">
<IFRAME SRC="dearpol.pdf" WIDTH="100%" HEIGHT="600"></IFRAME>
</div>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, about the points... You are right, this was a lot more than I expected. I am new to the forum (as if you couldn't tell) Is there a way to up the points?
yeah - there is a box to up the points, but i think that disappears once you've accepted an answer :(
------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Open New Window</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function openBrWindow(theURL,winNam
window.open(theURL,winName
}
//-->
</script>
</head>
<body>
<a href="#" onClick="openBrWindow('pdf
</body>
</html>