When we release our update early next year, all pages with forms on InsideDHTML are going to be ASP pages. Within the form,
we include a hidden field that is dynamically
populated with the current date and time. Using ASP and VBScript, we accomplish this by
writing in the current date and time into a hidden TIMESTAMP field. In the following fragment,
We also include an DOACTION field that allows us to distinguish between multiple types of forms on the same page. When the user clicks on the submit button, the results are sent to the same page. This happens automatically since we omitted the form's ACTION attribute to specify an alternative destination URL.
At the top of this page, we include an ASP script that tests the timestamp field
before accepting the submission. We use the value of the hidden DOACTION field to determine
what to do with this form. The DOACTION field is our approach to reusing form submission
code for different purposes.
At the beginning of each visit, each user gets their own unique Session object. On this Session object we store the timestamp of a particular user's last submission. On any form submission we perform the simple test comparing their last submission time with the time the current submission form was created. When they are not equal we assume its a new submission and process the results.
Page 1:Multiple Form Posts
© 1997-2000 InsideDHTML.com, LLC. All rights reserved.