| Daniel Wheeler 2005-07-24, 9:05 pm |
| Hi all. Got this pain in the arse problem. Been buggin me for days.
Looks so simple to do but you know who it is, the simple things are the
worsed lol.
Got this bit of Java code that changes the color of the background of a HTML
page. It does this by the user changing the color option in a dropdown box.
Below is the java code that is in the header and for html for the dropdown
boxy that is in the body.
<script LANGUAGE="JavaScript">
function color() {
document.bgColor=(""+ colc.cc.value +"");
}
</script>
<Body>
<p align="center" style="margin-top: 0; margin-bottom: 0">Background:
<font color="#E1FFE1"> <select name="cc" size="1">
<option value="#DBEBFD">Light Sky Blue
<option value="#FF,FE,CA">Beige
<option value="#E1,FF,E1">Pale Green
<option value="#FF,E1,FF">Light Pink
<option value="#FF,E1,D2">Pale Orange
<option selected value="white">White
</select></font></td>
</td><tr><td>
<p align="center" style="margin-top: 0; margin-bottom: 0"><input
type="button" name="button" value="Change Color!" onclick="color()">
</Body>
Basicly the problem i have is, this code needs to go on about 50-60 pages. I
know i can call up the javascript from an extrenal js file, but i need to
also add the HTML aswell. But to get round this im going to just add the
dropdown code into a seperate frame. but i cant think for the life off me how
point that color change across a frame!!!!
Anyhelp would be brilliant.
Thanks!!
Dan
|