roedel Posted November 3, 2005 Posted November 3, 2005 for a German shop i need to add a print button to the end of my conditions.php file. this code work quiet fine: <a href="java script:window.print();"><img src="click her to print" alt="Drucken" border="0"></a> But with this code all the links and images to the left and right of the conditions.php file are printed as well. Ingo from the German Forum posted this code: <head> <style media="screen"> #content {width: 680px;} #hint {text-align: center; padding-top: 10px;} #conditions {padding: 10px; } </style> <style media="print"> #content {width: 100%;} #conditions {padding: 0px;} #hint {display: none;} </style> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <div id="content"> <div id="hint" class="smalltext">(<a href="java script:window.print();">ausdrucken</a>)</div> <div id="conditions" class="main"> Hier kommt der anzuzeigende Text </div> <script language="javascript"> if (navigator.appName == 'Netscape') document.write("<div id=dummy></div>"); </script> </div> <!-- made by Ingo, www.strelitzer.de --> </body> <script language="javascript"> <!-- var i=0; if (navigator.appName == 'Netscape') { i=20; content.clientHeight = dummy.offsetTop; } window.resizeTo(700, content.clientHeight+64+i); self.focus(); //--> </script> But i cant get it running on my conditions.php I get the following error message: "Parse error: parse error, unexpected T_STRING in /home/helixpar/public_html/europe/includes/languages/german/conditions.php on line 322" line 322 contains this code: if (navigator.appName == 'Netscape') document.write("<div id=dummy></div>"); can anybody help? Thanks Chris
Recommended Posts
Archived
This topic is now archived and is closed to further replies.