style.backgroundImage not working in IE
still very new to Java but I'm trying to get the background image to change when clicknig a link and this code work in all browsers but IE. I have tried the suggestions that worked for you regards ;'s, any help would be awesome.
var backImage = new Array();
backImage = "url(images/bg1.jpg)";
backImage = "url(images/bg2.jpg)";
backImage = "";
document.body.style.backgroundImage = backImage[whichImage];
Got this working, please find the correct code below. Also please note that IE seems to not like large files for backgrounds? very annoying when other browsers don't have issues. Hope this helps.
<input type="button" onclick="changeStyleOak()" style="background-image:url(images/backgrounds/natural_oak.jpg);" />