Yes but, that's where the part I mentioned about making up a separate function comes in because, not only would we want to change the currently clicked item to look 'active' but, also remove this quality from any that are now 'inactive', while at the same time carrying out the actual change to the display of the form. It's Really more code than you want to cram into the body HTML portion of a page.
Something like so:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function togField(fld, state, ael, ina){
document.getElementById(fld).style.display=state;
ael.style.textDecoration='underline';
document.getElementById(ina).style.textDecoration='none';
}
</script>
</head>
<body>
<input id="date" name="date" type="text" style="display:none;"><br>
<span id="bydate" style="cursor:pointer;" onclick="togField('date','inline',this,'bycontent');">Search by Date</span><br>
<span id="bycontent" style="cursor:pointer;text-decoration:underline;" onclick="togField('date','none',this,'bydate');">Search by Content</span>
</body>
</html>
Bookmarks