Forum Moderators: coopster & phranque

Message Too Old, No Replies

frames problem

         

shakes911

1:29 pm on Apr 6, 2001 (gmt 0)



hi, i've designed a site which uses a number of frames. the site is based around two panels, a procedures panel (login, search etc.) in one frame and a content panel in another. I've written a search script which works but need to display the results in the content panel.

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.

shakes911

1:36 pm on Apr 6, 2001 (gmt 0)



This is basically the code behind it:

(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")

sugarkane

8:39 pm on Apr 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi shakes. Nothing jumps out at me as being wrong. What's the HTML of the form calling the script?

shakes911

8:41 am on Apr 9, 2001 (gmt 0)



the form code is as follows:

<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>

sugarkane

10:41 pm on Apr 10, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A shot in the dark:

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)

shakes911

8:32 am on Apr 11, 2001 (gmt 0)



I'll take a look at that. Thanks for taking the time to look at it.