...

View Full Version : print a different page



havey
05-30-2005, 07:47 PM
hi, i was wondering how could it be possible to have a link that when clicked on prints a different page in the same directory. I can't use frames

thanks

vwphillips
05-30-2005, 08:23 PM
Cant test this - No Ink



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
</head>

<body>
<a href="P2.htm?print">LINK</a>
</body>

</html>







<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
Loc=top.location.toString();

function CkPrint(){
Loc=Loc.split('?');
if (Loc[1]){
if (Loc[1]=='print'){
print();
window.top.location='P1.htm';
}
}
}

//-->
</script></head>

<body onload="CkPrint();">
Print Me
</body>

</html>

rlemon
05-30-2005, 09:16 PM
if you can use an iframe it's easily acheived, however if you cannot use frames of any kind than it's a little more difficult

glenngv
05-31-2005, 05:54 AM
Depending on the details of your requirements, you can do this (http://www.dynamicdrive.com/dynamicindex9/printstyle.htm) (IE-only) or this (http://wsabstract.com/dhtmltutors/cssmedia2.shtml) (without the need of a separate document).

rlemon
05-31-2005, 02:17 PM
open the new page in a popup, then print the new page?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum