Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Refreshing pages and resubmitting forms

    I'm not sure if this is achievable in JavaScript or not (am using ColdFusion, so that is another possibility).

    I have a list of tasks on a page and when a user submits a new task the page is reloaded, the submission to the database is processed at the top, and then when the list appears it has the new task in it.

    This works, no problem.

    But if the user refreshes the screen after that then the form is resubmitted and the data ends up in the database again.

    Is there a way to get rid of the form data after it has been submitted and make the page act as if no form submission has been made?

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    that then the form is resubmitted
    how's that? Isn't it there a submit button? Or the submitting process is auto, somehow? (which is not a wise thing, I reckon)
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's what happens as standard. If you submit a form anywhere and then refresh the page it asks you if you want retry submitting the form.

    "The page cannot be refreshed without resending the information.
    Click retry to send the information again,
    or click Cancel to return to the page that you were trying to view"

  • #4
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can no one advise me on this?

    It sounds, from what Kor said that there is a way to refresh a page without the form automatically resubmitting.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WillowFae
    It sounds, from what Kor said that there is a way to refresh a page without the form automatically resubmitting.
    That is not correct, there is no way to refresh a page that's the result of submitting a form without submitting the form again.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    Regular Coder
    Join Date
    Jan 2004
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you are using a popup window to create the new record in the Database, you can use javascript to populate the drop down with the new value. I am doing this successfully in ColdFusion w/javascript without a problem.


  •  

    Posting Permissions

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