I looked for the line of code in search.asp but couldn't find it. Could you please clarify.
Below is the code for search.asp
Thanks again !
Search.asp
<------------------------------------------------------------------------------------------>
<%@ Language=VBScript %>
LOGIN##
<%
If Session("UserID")="" or CheckSecurity("", "Search")<>True Then
Response.Redirect "login.asp"
End If
%>
/LOGIN##
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--#include file="include/##SHORTTABLENAME##_dbconnection.asp"-->
<!--#include file="include/##SHORTTABLENAME##_variables.asp"-->
<!--#include file="include/##SHORTTABLENAME##_aspfunctions.asp"-->
<STYLE>
.vis1 { visibility:"visible" }
.vis2 { visibility:"hidden" }
</STYLE>
<script>
function ShowHideControls()
{
var i;
for (i=0;i<document.forms.frmAdmin.SearchFor2.length; ++i)
{
document.forms.frmAdmin.SearchFor2[i].className =
document.forms.frmAdmin.SearchOption[i].options.length - 2 ==
document.forms.frmAdmin.SearchOption[i].selectedIndex ? 'vis1' : 'vis2';
}
return false;
}
function OnKeyDown()
{
e = window.event;
if (e.keyCode == 13)
{
e.cancel = true;
document.forms[0].submit();
}
}
</script>
<html>
<head>
<title><% =strTableName %>: Advanced search page</title>
</head>
<body bgcolor=white onLoad="java script:document.forms[0].onkeydown = OnKeyDown; return ShowHideControls();">
<!-- search form -->
<form method="POST" action="##SHORTTABLENAME##_list.asp" name="frmAdmin">
<input type=hidden id=masterkey name=masterkey value="<%=Request.Form("masterkey")%>">
<input type="hidden" id="action" name="action" value="AdvancedSearch">
<table rows='1' cols='1' align='center' width='400' border='0'>
<tr><td align="right">
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR><TD BGCOLOR=black align=center>
<table border=0 width=100% CELLPADDING=3 CELLSPACING=1>
<tr valign=center class=blackshade>
<td colspan=4 align=center valign=middle>
<b>Advanced Search</b> </td></tr>
ADVSEARCHFIELDS##
<!-- ##FIELD## -->
<tr class=shade>
<td><%=Label("##FIELD##")%></td>
<input type="hidden" id="FieldName" name="FieldName" value="##FIELD##">
<input type=hidden name=NeedQuotes<%= BuildFieldName("##FIELD##") %> value="<%= Request.Form("NeedQuotes" & BuildFieldName("##FIELD##")) %>">
<td>
<% call WriteSearchOptions %>
</td>
<td><input type=text size=20 name=SearchFor></td>
<td><input type=text size=20 name=SearchFor2></td>
</tr>
/ADVSEARCHFIELDS##
<tr class=blackshade><td colspan=4 align=center>
<input type=button class=button name="SearchButton" value="Search"
onClick="java script: document.forms.frmAdmin.action.value = 'AdvancedSearch';
document.forms.frmAdmin.submit();">
<input class=button type=reset value="Reset">
<input type=button class=button value="Back to list" onClick="java script: history.go(-1);">
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</form>
<%
Sub WriteSearchOptions
Response.Write "<SELECT ID=""SearchOption"" NAME=""SearchOption"" SIZE=1 onChange=""return ShowHideControls();"">" &
"<OPTION VALUE=""Contains"">Contains</option>" &
"<OPTION VALUE=""Equals"">Equals</option>" &
"<OPTION VALUE=""Starts with ..."">Starts with ...</option>" &
"<OPTION VALUE=""More than ..."">More than ...</option>" &
"<OPTION VALUE=""Less than ..."">Less than ...</option>" &
"<OPTION VALUE=""Equal or more than ..."">Equal or more than ...</option>" &
"<OPTION VALUE=""Equal or less than ..."">Equal or less than ...</option>" &
"<OPTION VALUE=""Between"">Between</option>" &
"<OPTION VALUE=""IsNull"">Empty</option>" &
"</SELECT>"
End Sub
%>