|
rdouglass -> RE: Default Date and Search by Range (1/27/2005 9:26:07)
|
quote:
when a user initially goes to the query results page, I want it to default to information from the last 14 days. However, if the user submits different search criteria, I want his query to pull all ata matching his criteria regardless of the date, unless he enters a date range. Right where the fp_sDefault line is, maybe add some logic like so: IF Instr(Request.servervariables(HTTP_REFERER),Request.servervariables(URL))+0 = 0 THEN fp_sDefault="Layer=%&ProjectOwner=%&Scanner=%&Product=%&ID=%&Purpose=%&ScannerInstructions=%&SemInstructions=%&FromDate=" & DateAdd("d",-7,Date()) & "&ToDate=" & Date() ELSE fp_sDefault="Layer=%&ProjectOwner=%&Scanner=%&Product=%&ID=%&Purpose=%&ScannerInstructions=%&SemInstructions=%" END IF See what I'm doing? If the page didn't post to itself, then use the default dates; otherwise don't use 'em Haven't tested, but I think it should work. Any help?
|
|
|
|