var bgimage=new Array()
Now, this works fine with every manual refresh of the page and I can obviously get it to work with a <META> refresh, but I would like to do achieve this without resorting to this crude method.Note that I have additional code to stretch the image to the client browser resolution.I found this topic which look svery similar to what I want but doesn't have any code for the background image scaling ... http:[url]....
I'm putting together a portfolio site and I'd like to use high-res images that take up most of the screen to show different works. There would be a menu bar with links to each work, where a click on that work's link would change the background by doing a standard "dissolve" effect.I have seen many different plugins for "rotating" images and changing background colors at the click of a button. Is there a method specifically for this purpose? As an alternative to altering the background-image of the body itself,I would be willing to use a properly sized div (or div's) to achieve this effect.
The pages are based on tables, so the parts that change are all cells.
1. Can I define text instead of an image in the array? i.e. can I have the image change to say an apple in one cell and the next cell have text explaining what an apple is?
2. Would it be possible to put a countdown timer for when the image/text is going to change?
I spotted some nice code to change the background colour of a web page to one of four different colours at random but I can't find it now!
The method was to select a number at random from 1 to 4 by using the rnd() function and then dividing by modulus 4. The result was then used to select a cell in a 4 cell array which was holding a different colour in each cell of the array. I would like to have this code but lack the knowledge to re-create it.
I'm trying to change the background of a <div>. I'm using a thumbnail of an image so when the user clicks the thumbnail, depending on the size of the thumbnail the background of another <div> (where the larger image is displayed) will change.
I have it working..sort of. When I click the thumbnail the background will change to the specified image but after a couple of seconds it changes back to the original background on its own. I have no idea why this is happening.
i creating a 'map' for my game. I've got a 13x13 tile layout and using PHP I've loaded all the tiles.What I'm looking to do is grab all the tiles whose class names are 'water' and create a loop that'll change their background every second between four possible images.
I used this on-click changeable background code for my website code...
And now I have the same question as the original poster: is there any way to get it so that the chosen background stays put even if the page is refreshed or navigated away from? Or is it not possible because all my pages are separate files? code...
After you click on the last button 3 times it should change the background to the zombies image however it isn't working. I haven't found tutorials for doing it exactly as I am attempting it but I don't see why this isn't working.It runs through the code just fine and the button works as intended except for the fact that the background image isn't changing.
I want to create a basic script where someone clicks the button and the document color is changing. while I can do it with inline even handlers and also using the script block in html document, i am not able to achieve the result using the external js.js. My goal is not to use any even handlers at all inside the html document. why the script I wrote is not working.
I do not much understand what is going on. The iframe is transparent in all browsers but IE. I need to change the background color in IE, of my iframe and cannot figure it out. My code is below. It is pulling from an external file exfile.js.