[thelist] Formatting On The Fly
Paul Dewey
paul_dewey at hotmail.com
Thu Mar 8 14:45:26 CST 2001
I borrowed James Aylard work to better show how it could be done. I think
what he wanted to chang the text color and not the background color James.
I hope you don't mind I corrowed it and altered it to try and make what he
wanted to be completed. The following is what needs to be done. I hope it
is what you wanted. Here it is:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.basic { color: #000000; }
.one { color: #ffff00 ; }
.two { color: #FF0000; }
.three { color: #339900; }
.four { color: #0000FF; }
</style>
<script type="text/javascript">
<!--
function fnSwapClass(vClass) {
if (document.getElementById) { // for N 6 and IE 5/5.5
document.getElementById("divText").className = vClass ;
}
else {
if (document.all) { // for IE 4
document.all.divText.className = vClass ;
}
}
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<div id="divText" class="basic">Text to be changed</div>
<form>
<input type="radio" name="radio" id="radioOne"
onclick="fnSwapClass('one');">
<label
for="radioOne"> Yellow</label><br>
<input type="radio" name="radio" id="radioTwo"
onclick="fnSwapClass('two');"><label
for="radioTwo"> Red</label><br>
<input type="radio" name="radio" id="radioThree"
onclick="fnSwapClass('three');">
<label
for="radioThree"> Green</label><br>
<input type="radio" name="radio" id="radioFour"
onclick="fnSwapClass('four');"><label
for="radioFour"> Blue</label><br>
</form>
</body>
</html>
----Original Message Follows----
James Aylard
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the thelist
mailing list