[Javascript] Passing date from top frame to bottom . . .

John Hoft JAHOFT at hibernia.com
Fri Oct 24 17:56:53 CDT 2003


I have a standard top and bottom 2-window frameset, and need to pass from the top frame a date from a 'SELECT' pull down containing the dates that exist in a DB table column called SaleDate to the bottom frame which displays all records for the date selected.

I'm drawing a blank on how to get JavaScript (or anything else?) to pass the date from the top frame to the bottom, as well as having the bottom frame wait long enough for the top to get all the available dates. Unfortunately, the dates will change with the wind (very often) so I can't hard-code a preselected date for the bottom frame to pre-display.

Here's my top frame:
.
.
.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("MyApp")
RlDateQry = "SELECT Distinct top 50 SaleDate FROM RunLists order by SaleDate desc"
Set RLRs = conn.Execute(RlDateQry)
%>
<form name="topFrame">Select a Sale Date:<select size='1' name="topSelect">
<%
DO WHILE NOT RLRs.EOF
SaleDate = RLRs("SaleDate")
%>
<option value='<%=SaleDate%>'><%=SaleDate%></option>
<%
RLRs.MoveNext
LOOP
RLRs.Close
%>
</select>
</form>

...and my bottom frame will be similar ASP code that queries the same DB but filters for only the date selected in the top frame.  I can do the ASP coding for the bottom frame, but I just can't figure how to use JS to pass the date from the first frame to the second and put it in a variable that will be part of my SQL query.

Any ideas?  Also, can you think of a better way to display this info (instead of frames use divs, or maybe iframes)?

TIA...





More information about the Javascript mailing list