PDA

View Full Version : Background chooser help!



Lentus
07-01-2008, 04:36 PM
Heya,
I was wondering if anyone knows the php code and script for a background change plz thanks :)
+ rep btw

Decode
07-01-2008, 04:41 PM
Theres a javascript one here;

http://www.codebelly.com/javascript/backcolorchange.html

Lentus
07-01-2008, 05:57 PM
cheers anyone else i need like a image background one not colors

Verrou
07-01-2008, 08:20 PM
There's this thing, that was made for situations like this, uhm what's it called...oh yeah GOOGLE.

Verrou
07-01-2008, 09:17 PM
<html>
<head>
<title>BG Changer</title>
<STYLE type="text/css">
img{
border-color: black;
border-width:1px;
}
</style>
</head>

<body background="green.png">
<script language="JavaScript">
<!--

// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this

// Enter the image filenames you wish to use.
// Follow the pattern to use more images. The
// number in the brackets [] is the number you
// will use in the function call to pick each
// image.

// Note how backImage[3] = "" -- which would
// set the page to *no* background image.

backImage[0] = "blue.png";
backImage[1] = "yellow.png";
backImage[2] = "green.png";
backImage[3] = "";

// Do not edit below this line.
//-----------------------------

function changeBGImage(whichImage){
if (document.body){
document.body.background = backImage[whichImage];
}
}

//-->
</script>
<a href="javascript:changeBGImage(0)"><img src="blue_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(1)"><img src="yellow_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(2)"><img src="green_select.PNG" border="0" alt="Blue"></a>
</body>
</html>

That's a working one off CodeBelly, (Hint: I used Google). See the result: http://users.decrypterlive.com/~andre/bg/index.htm

Chippiewill
08-01-2008, 01:13 PM
thnx for posting I was looking for this +rep

MrCraig
08-01-2008, 01:35 PM
Woah. didnt know the javascript to change background was that simple :S

DeejayMachoo$
08-01-2008, 02:31 PM
Woah. didnt know the javascript to change background was that simple :S

Much easier than i though lol

3.141
08-01-2008, 02:39 PM
<html>
<head>
<title>BG Changer</title>
<STYLE type="text/css">
img{
border-color: black;
border-width:1px;
}
</style>
</head>

<body background="green.png">
<script language="JavaScript">
<!--

// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this

// Enter the image filenames you wish to use.
// Follow the pattern to use more images. The
// number in the brackets [] is the number you
// will use in the function call to pick each
// image.

// Note how backImage[3] = "" -- which would
// set the page to *no* background image.

backImage[0] = "blue.png";
backImage[1] = "yellow.png";
backImage[2] = "green.png";
backImage[3] = "";

// Do not edit below this line.
//-----------------------------

function changeBGImage(whichImage){
if (document.body){
document.body.background = backImage[whichImage];
}
}

//-->
</script>
<a href="javascript:changeBGImage(0)"><img src="blue_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(1)"><img src="yellow_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(2)"><img src="green_select.PNG" border="0" alt="Blue"></a>
</body>
</html>
That's a working one off CodeBelly, (Hint: I used Google). See the result: http://users.decrypterlive.com/~andre/bg/index.htm (http://users.decrypterlive.com/%7Eandre/bg/index.htm)

Wow...
Woaaaaaaaaaaah I've been searching for this and trying to make one myself for ages and that is SO SIMPLE.
Thanks so much, I would rep but hehe I just joined.

Lentus
08-01-2008, 04:00 PM
<html>
<head>
<title>BG Changer</title>
<STYLE type="text/css">
img{
border-color: black;
border-width:1px;
}
</style>
</head>

<body background="green.png">
<script language="JavaScript">
<!--

// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this

// Enter the image filenames you wish to use.
// Follow the pattern to use more images. The
// number in the brackets [] is the number you
// will use in the function call to pick each
// image.

// Note how backImage[3] = "" -- which would
// set the page to *no* background image.

backImage[0] = "blue.png";
backImage[1] = "yellow.png";
backImage[2] = "green.png";
backImage[3] = "";

// Do not edit below this line.
//-----------------------------

function changeBGImage(whichImage){
if (document.body){
document.body.background = backImage[whichImage];
}
}

//-->
</script>
<a href="javascript:changeBGImage(0)"><img src="blue_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(1)"><img src="yellow_select.PNG" border="0" alt="Blue"></a>
<br>
<a href="javascript:changeBGImage(2)"><img src="green_select.PNG" border="0" alt="Blue"></a>
</body>
</html>
That's a working one off CodeBelly, (Hint: I used Google). See the result: http://users.decrypterlive.com/~andre/bg/index.htm (http://users.decrypterlive.com/%7Eandre/bg/index.htm)

Lol thanksand i found one before hand but forgot to say thanks anyway im sure people would like that i have the same code i found on google to :P

MrCraig
08-01-2008, 04:24 PM
Much easier than i though lol

yeah.. the actual changer is just one small line of code :S

Want to hide these adverts? Register an account for free!