T
Testin da Cable
Guest
well, for a girl I know I'm fiddling with a bit of js. she wants a window to open of a certain size when a link is clicked, but for some odd reason she doesn't want to use html (or as little as she can)
here is the code:
I'm utterly failing for obvious reasons. But it got so late at night that my only thougt was to post it here. help me. please...help
here is the code:
Code:
<html>
<head>
<script language="javascript">
<!-- have to hide the script
function openWin(img) {
winId = window.open('');
winId.document.write('<body><center>');
winId.document.write('[img]' + img + '[/img]');
winId.document.write('<script language="javascript">');
winId.document.write('var Element = document.getElementById("Image");');
winId.document.write(' var w = document.getElementById("Image").width;');
winId.document.write(' var h = document.getElementById("Image").height;');
winId.document.write('window.resizeTo((w * 1.1), (h * 1.1));');
winId.document.write('</script>');
winId.document.write('</center></body>');
winId.document.close();
}
-->
</script>
</head>
<body>
[url="javascript:openWin('test.jpg')"][img]t_test.jpg[/img][/url]
</body>
</html>
I'm utterly failing for obvious reasons. But it got so late at night that my only thougt was to post it here. help me. please...help