Forum Moderators: open
<html>
<head>
<title>Test</title>
<script langauage="javascript">
function NewWindow(mypage, myname) {
winprops = 'height=400,width=600,scrollbars=yes,resizable, status=no, address=yes'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>
</head><body>
<a href="#" onClick="NewWindow('product.jpg','name');return false;">Click here for Product</a>
</body>
</html>
You can the window size can be changed by altering the height/width properties in the Script section. Change 'product.jpg' to the location of the page or file you want to open
Katy
<a href="http://www.yourdomain.com/exactpath/image.jpg" target="_blank" onclick="PopUp=window.open('http://www.yourdomain.com/exactpath/image.jpg', 'NewWin', 'resizable=yes,width=380,height=380,left=50,top=25,screenX=50,screenY=25'); PopUp.focus(); return false;">name of link </a>
note the absolute url is there twice for it to work
set the width and the height slightly larger than the image if you want the entire image to be visible without scrolling
Common window options are:
width=(in pixels, e.g. 350)
height=(in pixels)
toolbar=(yes/no)
directories=(yes/no)
location=(yes/no)
menubar=(yes/no)
resizeable=(yes/no)
scrollbars=(yes/no)
status=(yes/no)
<a href="" OnClick="window.close()">Close Window</a>