This is my JavaScript function called message_help:
Code:
function message_help(message)
{
var helpTd = document.getElementById("helpTd");
if(message!="")
{
helpTd.className = "font4";
helpTd.style.backgroundColor = "<%=minirules%>";
helpTd.style.borderColor = "#000000";
//helpTd.style.borderLeft = "#000000";
//helpTd.style.borderTop="#000000";
helpTd.innerHTML=message;
}
else
{
helpTd.innerHTML = " "+
" "+
" "+
" ";
helpTd.style.borderColor="<%=lightMain%>";
//helpTd.style.borderLeft="<%=lightMain%>";
//helpTd.style.borderTop="<%=lightMain%>";
helpTd.style.backgroundColor="<%=lightMain%>";
}
}
This is my HTML table display code:
Code:
<table width="100%" align="center" bgcolor="<%=lightMain%>" id="submit_table" border="1" bordercolor="<%=lightMain%>">
<tr id="helpTr">
<td colspan="2" id="helpTd">
</td>
</tr>
<tr>
<td align="center">
<input type="button" name="help" value="Submit" onClick="chkFrm();" class="font2" onMouseOver="style.cursor='pointer';" />
</td>
</tr>
</table>
My problem is that when i load the page for the first time it is fine. There is a border but it is the same colour as the rest of the table.
Now, when i mouseover an image it passes a 'message' to message help and that fills the td cell.
But, i want the cell to have a BLACK border onmouseover and onmouseOUT it should go back to '<%=lightMain%>'. However, it doesnt and keeps the border as black on the top and the left???
This seems strange?? Any ideas?
Picco
www.crmpicco.co.uk