[thelist] Formatting On The Fly

Salvatore Palmisano spalmisano at usaiss.com
Thu Mar 8 15:01:17 CST 2001


Yes I need the text color to be changed...all of this is for an IE only site
that Im going to be the only one using.
I'll need the pages while Im working 'in the field' at an event our company
is responsible for, and am not worried about cross browser usage or
error-catching or anything like that...just something quick and dirty that
will change text to either red or black depending on which radio was
checked.

I havent had a chance to give any of this a try, but all of your suggestions
are greatly appreciated.  Thanks everyone!

--Salvatore Palmisano
Chief Information Officer
International Security Solutions, Inc.
spalmisano at usaiss.com

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Paul Dewey
Sent: Thursday, March 08, 2001 3:46 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] Formatting On The Fly


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">&nbsp;Yellow</label><br>
  <input type="radio" name="radio" id="radioTwo"
    onclick="fnSwapClass('two');"><label
      for="radioTwo">&nbsp;Red</label><br>
  <input type="radio" name="radio" id="radioThree"
    onclick="fnSwapClass('three');">
  <label
      for="radioThree">&nbsp;Green</label><br>
  <input type="radio" name="radio" id="radioFour"
    onclick="fnSwapClass('four');"><label
      for="radioFour">&nbsp;Blue</label><br>
</form>

</body>
</html>





More information about the thelist mailing list