Hi Experts,
Please look at the code below. When a user clicks one of the two fields the field is highlighted with a bold border. It works with Firefox and Chrome but not IE.
<html>
<head>
<title></title>
<link href="default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function highlightOffer(offerNumber) {
switch (offerNumber) {
case 1:
document.getElementById('offer1').setAttribute("style", "border-width: 5; border-spacing: 1; border-style: solid; border-color: Green;");
document.getElementById('offer2').setAttribute("style", "border-width: 5; border-spacing: 1; border-style: none; border-color: Green;");
break;
case 2:
document.getElementById('offer1').setAttribute("style", "border-width: 5; border-spacing: 1; border-style: none; border-color: Green;");
document.getElementById('offer2').setAttribute("style", "border-width: 5; border-spacing: 1; border-style: solid; border-color: Green;");
break;
}
}
</script>
</head>
<body>
<center>
<table width="1000">
<tr>
<td width="25%">
<table onclick="javascript:highlightOffer(1);" id="offer1" style="border-width: 5;
border-spacing: 1; border-style: none; border-color: Green;" width="100%">
<tr>
<td align="center" style="border-width: 1; border-style: solid; border-color: Green;"
bgcolor="White">
<br />
<h2>
1 Title</h2>
<br />
</td>
</tr>
</table>
</td>
<td width="25%">
<table onclick="javascript:highlightOffer(2);" id="offer2" style="border-width: 5;
border-spacing: 1; border-style: solid; border-color: Green;" width="100%">
<tr>
<td align="center" style="border-width: 1; border-style: solid; border-color: Green;"
bgcolor="White">
<br />
<h2>
2 Title</h2>
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</center>
</body>
</html>