can I clear form fields after submission

Results 1 to 2 of 2

Thread: can I clear form fields after submission

  1. #1
    webrookie Guest

    Default can I clear form fields after submission

    I have a form that a user enters data into and then submits.<BR><BR>The page the form is submitted to process the request and updates a database. Is there a way to clear the fields that are submitted? So that if the user hits refresh, or the submit button too many times, their data isn&#039t inserted that many times.<BR>Here is an example of what I do.<BR><BR>If not isempty(request.form("message")) then<BR> somequery<BR> rs("id") = request.form("id")<BR> rs("message") = request.form("message")<BR> rs.close<BR> set rs = nothing<BR>end if<BR><BR>That&#039s just a sample of what I have. Now I don&#039t want the data to be resubmitted if the user hits refresh...anyway to prevent that, and at the same time, I&#039d like them to be able to refresh the page to reflect any changes....I hope I haven&#039t confused anyone<BR><BR>thanks in advance.

  2. #2
    KPW Guest

    Default RE: can I clear form fields after submission

    What you might try is, from your form handler, redirecting to a third page that indicates the success/failure of your operation. That way, no matter how many times the user refreshes that page, the database won&#039t be updated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts