I think your error was in calling the function.
In your HTML code, onclick
is calling the image()
function. However, in your script the function is named imgWindow()
. Try changing the onclick to imgWindow()
.
I don't do much JavaScript so if I have missed something, please let me know.
Good Luck!