Requery Recordset - Redirect based upon action or cookie data

Hello!

I have a webpage using three frames for employees to submit reports. The top form allows them to search thru previous entries and view the results on the right-side frame. The bottom frame has a Data entry form to submit their new report. I am using a cookie to store the user’s previous report search and need to pass this so that it will be the default option on the bottom form for the select list they will use to submit a new report. It works, however, I have to requery the page so that the select list on the bottom form picks up the stored cookie in the recordset.

Any ideas on how I can have the bottom form requery based on an action (when the user clicks on ‘Go’ using the top form view a previous entry) or if the cookie has data? What is happening is when the user goes to the page for the first time, they have to refresh the page so that the select list will populate based upon their stored cookie.

I hope this makes sense. I’m new to using cookies and I may be going about it wrong.

Crystal

I’m not sure that I follow exactly, but if you need to refresh a frame from a button click in another frame this should work:

index.asp

<frameset>
<frame name="f1" src="frame1.asp">
<frame name="f2" src="frame2.asp">
<frame name="f3" src="frame3.asp">
</frameset>

frame2.asp

<input type="button" name="go" value="Go" onclick="parent.f3.location.reload()">

Hello!

Thank you for your help with this! I don’t like using frames but I have to for this one page. I’ve tried variations of your sample and can’t get the frame to refresh, I even tried requery.
Here’s my code:

<frameset rows=“" cols=“71%,29%” frameborder = “no” id=“MainFrame”>
<frameset rows="84
,492*” cols=“10%” frameborder=“no” id=“SubFrame”>
<frame src=“/Reports/Search Monthly Report - Employee History.asp” name=“Search” frameborder=“yes” scrolling=“auto” marginwidth=“0” marginheight=“0” id=“SearchForm” />
<frame src=“/Reports/Add Report.asp” name=“AddReport” frameborder=“yes” scrolling=“auto” marginwidth=“0” marginheight=“0” id=“AddReport” />
</frameset>
<frame src=“/Reports/Add Monthly Report - History.asp” name=“ReportHistory” / frameborder=“yes” scrolling=“auto” marginwidth=“0” marginheight=“0” id=“ReportHistory” />
</frameset>

I’ve tried using the onclick as: “parent.AddReport.location.reload()” and as “SubForm.AddReport.location.reload()”

I’m sure it’s something simple I am missing!

Crystal

give your frames an ID as well as a name and use something like

document.getElementById(FrameID).contentWindow.location.reload(true);

In any case, this is a clientside javascript question rather than an ASP question, so you might get better support if you move this thread to a javascript group.