So far, when the search button is clicked the window is refreshed and a searchflag is sent. If the searchflag is positive a a results page is loaded into the content frame and a request.form command asks
for the contents of the search box which is then forwarded to a search script, and the results are supposed to be presented.
However, no matter which way I do it, when I request.form the searchbox it always reads a null value and so i always receive a search result of 0.
Any ideas?
Cheers.
(PROCPANEL.ASP)
<form method="POST" action="javascript:top.location.href='index.asp?sflag=1'">
=====================
(INDEX.ASP)
flag = Request.Querystring("sflag")
sitem = Request.Form("searchbox")
if flag = "1" then
Response.Write("<frame src=search2.asp?skey=" & sitem & " name=content noresize border=0>")
else
Response.Write("<frame src=news.asp name=content noresize border=0>")
end if
=======================
(SEARCH.ASP)
sterm = Request.Querystring("skey")
<form method="POST" action="javascript:top.location.href='index.asp?sflag=1'">
<INPUT TYPE="text" NAME="searchbox" SIZE="14" MAXLENGTH="50" value="Search Site">
<input type="image" src="images/left_go.gif" name="searchbutton" alt="Search" border="0">
</form>
Could the use of both the query string (index.asp?sflag=1) and a form using POST be confusing ASP?? I've tried it in Perl and it doesn't cause any problems, but it's the only thing I can think of... it might be worth passing sflag as a hidden field in the form to see if it makes any difference (I'm clutching at straws here I'm afraid, and I don't have an ASP server around at the moment to experiment on)