Hej alle
Åbner vinduet men ingen data !
Nogen der kan ser hvad jeg mangler..??
------------------------------
- opener.html
------------------------------
<html>
<head>
<title>Test Page</title>
<script language="JavaScript" type="text/javascript">
function runTest()
{
var mychild = window.open('printcafe.html');
}
</script>
</head>
<body>
<table id="ksa">
<tr>
<td>hello</td>
</tr>
</table>
<br><br>
<input type="button" value="Run Test"
onclick="javascript:runTest();">
</body>
</html>
------------------------------
- printcafe.html
------------------------------
<html>
<head>
<script language="JavaScript">
function main()
{
var data = "";
data += "<TABLE id=\"ksaprint\" style=\"FONT-SIZE: 11px; Z-INDEX:
200; LEFT: 48px; WIDTH: 647px; CURSOR: hand; COLOR: #336699;
FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #ffffff
border-color:#ccccff\" height=\"12\" cellSpacing=\"1\"
cellPadding=\"2\" width=\"648\" border=\"1\">";
data += window.opener.document.getElementById("ksa").innerHTML;
data += "</table>";
document.getElementById("mychild").innerHTML = data;
}
</script>
</head>
<body onload="javascript:main();">
<form id="mychild">
</form>
</body>
</html>
Jens
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials