Keep a value on page refresh
I used FrontPage Database wizard to create a page showing results for a queried date from a database of dated events. I'm using javascript to get today's date on page load ("var CurrentDate = new Date()"), a var QueryDate formats CurrentDate data to match my database field and stores it in a hidden form field, and a var DisplayDate is formatted to be displayed to the user. A user can use "Prev day" and "Next day" buttons continuously to select another date to query (decrimenting or incrementing all three vars). So, if a user goes back 3 days, and clicks a "Go" button, he views events for that day. BUT - when the results appear, the query field and the displayed date are reset to today. I'm assuming that the page is being refreshed to display the results. I want the query date and displayed date to stay on the date the user selected before he clicked "Go". I've tried using boolean variables and hidden fields with no luck. My code is too extensive to post here, but you can see my experimental page and view source at http://mvlivemusic.com/schedule.asp. I apologize for the complication, and if anyone is still willing to help - thank you very much!
[1182 byte] By [
Steve Putt] at [2007-11-20 11:20:22]

# 1 Re: Keep a value on page refresh
You are close with your assumption of refreshing. It is posting a form. That means it is sending data to the server and results are returned. It is the equivalent of opening a new webpage.
Since it is processing a form, you can use the server to store the variable, then use Response.Write() to put the variable back in the value of the textbox.