Menu
Hi
I guess my problem has to do with not knowing where to put [I]this
I dont know though…
I want to open a new window and show a image called image.jpg.
When putting onclick inline you put this.src in parentheses when calling for the function.
<script type=”text/javascript”>
function init()
{
var k = document.getElementById(“test”);
k.onclick = kn;
}
function kn()
{
var newimgSrc = picsrc.replace(“_small”,””);
window.open(newimgSrc);
}
window.onload = init;
</script>
<body>
<input type=”image” src=”image_small.jpg” id=”test”>
</body>