Dear all, I ask for your forgiveness for the huge amount of code I am going to dump.
I believe my problem (which I am about to explain) lies with either toolbar.js or search.asp.
The process flow is as follows:
The user clicks on index.asp and a page called top_bar.asp opens up and asks the user to select a search option.
Depending on the user's choice, a javascript function called function openSearch() (which is in toolbar.js) is invoked.
Depending on your search type, search.asp is called.
Say for instance, you want to search for address, once you select "Address" under Search by (top_bar.asp), toolbar.js is supposed to determine that you want to search by address by calling search.asp to open the "Enter Address" search box.
So far, after selecting say, address as a search option, search.asp is invoked but instead of opening the search box to search for address, it always returns blank.
I just can't figure out where the problem is coming from.
Here are the toolbar.js and search.asp pages.
Please, please, I am begging for your assistance.
This has stumped me now for 2 days.
************
toolbar.js
***********
<language="JavaScript">
function openSearch() {
var search_type = top.top_bar.document.buttonForm.search.options[top.top_bar.document.buttonForm.search.selectedIndex].value;
window.open("search.asp?atype="+search_type,"searchWin","width=500,hei ght=400,scrollbars,resizable,status");
top.top_bar.document.buttonForm.search.selectedIndex = 0;
}
</script>
************
search.asp
***********
Code:
<html>
<head><title>Search</title>
<script language="javascript" src="toolbar.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body onLoad='window.focus()'>
<%
dim atype
Response.Write "<div align='center'>"
select case atype
case "owner"
Response.Write "<font size='-1'>Enter name (e.g., smith john)</font><br>"
Response.Write "<form name='owner_search' method='post'>"
Response.Write "<input type='text' name='owner' size='20'>"
Response.Write "<input type='submit' name='action' value='search'>"
Response.Write "<input type='hidden' name='actionh' value='search'>"
Response.Write "</form>"
case "pin"
Response.Write "<font size='-1'>Enter parcel PIN:</font><br>"
Response.Write "<form name='owner_search' method='post'>"
Response.Write "<input type='text' name='pin' size='20'>"
Response.Write "<input type='submit' name='action' value='search'>"
Response.Write "<input type='hidden' name='actionh' value='search'>"
Response.Write "</form>"
case "address"
Response.Write "<font size='-1'>Enter the address</font><br>"
Response.Write "<form name='situs_search' method='post'>"
Response.Write "<input type='text' name='situs' size='20'>"
Response.Write "<input type='submit' name='action' value='search'>"
Response.Write "<input type='hidden' name='actionh' value='search'>"
Response.Write "</form>"
Response.Write "<i><Font size='2' color=#660066><B>Do not abbreviate any word in street name <br>"
Response.Write " If you have problems try just a part of the street name<br>"
Response.Write " ex. '141 Pryor' -- finds 141 PRYOR SRTEET SW, <br>"
Response.Write " '5165 WELCOME ROAD' -- finds 5165 WELCOME ALL ROAD</font></i>"
case "street"
Response.Write "<font size='-1'>Enter street name</font><br>"
Response.Write "<form name='situs_search' method='post'> "
Response.Write "<input type='text' name='street' size='20'>"
Response.Write "<input type='submit' name='action' value='search'>"
Response.Write "<input type='hidden' name='actionh' value='search'>"
Response.Write "</form>"
case "landlot"
response.write("<form name='landlot_search' method='post'>" &_
"Enter tax district <select name='dist' size='1'>" &_
"<option value='11'>1-1</option>" &_
"<option value='12'>1-2</option>" &_
"<option value='21'>2-1</option>" &_
"<option value='22'>2-2</option>" &_
"<option value='06'>06</option>" &_
"<option value='07'>07</option>" &_
"<option value='08'>08</option>" &_
"<option value='09C'>09C</option>" &_
"<option value='09C'>09F</option>" &_
"<option value='13'>13</option>" &_
"<option value='14'>14</option>" &_
"<option value='14F'>14F</option>" &_
"<option value='15'>15</option>" &_
"<option value='17'>17</option>" &_
"<option value='18'>18</option>" &_
"</select>" &_
"and land lot <input type='text' name='landlot' size='4'>" &_
"<input type='submit' name='action' value='search'>" &_
"<input type='hidden' name='actionh' value='search'>" &_
"</form>")
end select
response.write "</div>"
response.write atype
response.end
IF actionh = "search" Then
Select Case atype
Case "address"
%><!--#include file="situs_search.asp"--><%
End Select
End If
%>
<body>
<html>