I have a button that when clicked opens a window with a new link.
I would like a image above the button.
I would like to include a function like ChangeImage() with the buttons onclick event to change the image to another(when the button is clicked)
Whats the best script for this; There are many more buttons on the page and repeated openlink function calls.
function ChangeImage() {
Change current image to this image
}
function openlink1() {
var open1 ='http://yahoo.com'
window.open(open1,'','scrollbars=yes,height=540,width=785,resizable=yes');
}
<input type=button value="Yahoo"
onclick="javascript:location.href='javascript:openlink1()'"
javascript:ChangeImage()">



