hi all, i have 4 link buttons.all of them opens a popup window. i want when i click on button it gets highlited.
pls help. its urgent.
Neel.
pls help. its urgent.
Neel.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style type="text/css">
.normal{
background-color: #999999;
}
.highlight{
background-color: #FF3333;
}
</style>
<script type="text/javascript">
function highlightThis(ths)
{
for(var i=1;i<=4;i++)
{
var tempId = "select"+i;
if(ths.id==tempId)
{
document.getElementById(tempId).className = "highlight";
}
else
{
document.getElementById(tempId).className = "normal";
}
}
}
</script>
</HEAD>
<BODY>
<table width="100%" cellspacing="0" cellpadding="3px">
<tr>
<td>
<input type="button" value="Select1" id="select1" name="select1" class="normal" onclick="highlightThis(this)">
</td>
<td>
<input type="button" value="Select2" id="select2" name="select2" class="normal" onclick="highlightThis(this)">
</td>
<td>
<input type="button" value="Select3" id="select3" name="select3" class="normal" onclick="highlightThis(this)">
</td>
<td>
<input type="button" value="Select4" id="select4" name="select4" class="normal" onclick="highlightThis(this)">
</td>
</tr>
</table>
</BODY>
</HTML>
function highlightThis()
{
for(var i=1;i<=4;i++)
{
// reset all class names to "normal"
document.getElementById("select"+i).className = "normal";
}
// set current class name to "highlight"
this.className = "highlight";
}
Comment