Search Box: Search the CSUF or Campus Directory
Here's the code from the campus home page which gives users the choice of searching the web or the campus online directory:
Here's the code for this form:
<form name="frmSearch2" method="post" action="#" onSubmit="return checkSubmitVal();">
<table width="267" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="267">
<input type=radio name="enable" value="fullerton.edu" onClick="whichone =0;" checked id="radio" alt="CSUF Web">
<span class="body_text">CSUF WEB</span>
<input type=radio name="enable" value="person" onClick="whichone =1;" id="radio3" alt="CSUF People">
<span class="body_text"><span class="body_text">CSUF PEOPLE</span></td>
</tr>
<tr>
<td> <img src="../images/site_elements/placeholder.gif" alt="" width="1" height="1">
<input name="q" id="q2" type="text" value="keyword(s)" alt="keyword(s)" size="20" onFocus="javascript:clearsearch()">
<A HREF="javascript:document.frmSearch.submit()" onClick="return checkSubmitVal();">
<img src="images/go button.bmp" alt="Search" border="0" align="absmiddle"></A> </td>
</tr>
</table>
</form>
<form name = "frmText2" method=get action="http://google.fullerton.edu/search" target="_blank">
<input type="hidden" name="q" value="" size="23" alt="">
<input type="hidden" name=hl value=en alt="">
<input type="hidden" name="site" value="default_collection"/>
<input type="hidden" name="client" value="csuf_frontend"/>
<input type="hidden" name="proxystylesheet" value="csuf_frontend"/>
<input type="hidden" name="output" value="xml_no_dtd"/>
</form>
<form name='frmPhone2' method='post' target = '_blank' action = 'http://my.fullerton.edu/directory/index.aspx' >
<input type='hidden' name='Search' alt="">
<input type='hidden' name='stype' value='cnt' checked alt="">
</form>
This form also requires that the following JavaScript be included in the page header:
<script language = javascript>
function clearsearch() {
if (document.frmSearch2.q.value == "keyword(s)")
{
document.frmSearch2.q.value = "";
}
}
var whichone = 0; // 0 means 'search', 1 means 'person'
var hasSubmit = 0
function formSubmit(type)
{
clearsearch();
if (type == 0)
// alert("submit button");
if (type == 1)
// alert("enter");
hasSubmit = 1
if (whichone == 0)
{
// alert(whichone);
document.frmText2.q.value = document.frmSearch2.q.value;
document.frmText2.submit();
}
else if (whichone == 1)
{
// alert(whichone);
document.frmPhone2.Search.value = document.frmSearch2.q.value;
document.frmPhone2.submit();
}
}
function checkSubmitVal(){
//alert("enter clicked");
formSubmit(1);
return false;
}
//-->
</script> |