1
I am trying to get the background to change on every click of a link. It works fine on a normal html website. But it wont work in xoops. I have the javascript file in the include folder with the images directory in it. And I have the file linked to in the theme.html file. I check the error console in firefox and there are no errors. Just no change. Here is my javascript code.
le="color: #000000"><?php var backgroundpics = new Array(); backgroundpics[0] = "images/background1.jpg"; backgroundpics[1] = "images/background2.jpg"; backgroundpics[2] = "images/background3.jpg"; backgroundpics[3] = "images/background4.jpg"; backgroundpics[4] = "images/background5.jpg"; function changebackground() { var number = (Math.floor(Math.random()*5)) document.body.background=backgroundpics[number] }
the function is access as an onclick event in the usermenu and mainmenu templates which i have edited.