Hi, Apologies, I removed the field name i was passing to play around with the code, here is the full function code:
HTML Code:
function Mem_Title()
{
if (gF('member_title').value == "")
{
showCross('member_title');
}
}
The full code is as follows:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language = "javascript" type = "text/javascript">
function showCross(theId)
{
var cross.src = "<img src="tick/cross.gif" height = "20" width = "20">";
var errorImage = document.getElementById(theId+"_error");
errorImage.innerHTML = cross.src;
}
function Mem_Title()
{
if (gF('member_title').value == "")
{
showCross('member_title');
}
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="656">
<tr>
<td class="col2">Title</td>
<td class="col3"></td>
<td class="col4"><select name="member_title" id="member_title" style="width: 100px;" onblur="Mem_Title()">
<option value="">Select</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
</select>
</td>
<td class="col5"> <span id="member_title_error"></span></td>
</tr>
</table>
</body>
</html>
Bookmarks