Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-12-2004, 11:06 AM   PM User | #1
WillowFae
New Coder

 
Join Date: Nov 2002
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
WillowFae is an unknown quantity at this point
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?
WillowFae is offline   Reply With Quote
Old 11-12-2004, 12:11 PM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
Quote:
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
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 11-12-2004, 12:24 PM   PM User | #3
WillowFae
New Coder

 
Join Date: Nov 2002
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
WillowFae is an unknown quantity at this point
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"
WillowFae is offline   Reply With Quote
Old 11-15-2004, 11:20 AM   PM User | #4
WillowFae
New Coder

 
Join Date: Nov 2002
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
WillowFae is an unknown quantity at this point
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.
WillowFae is offline   Reply With Quote
Old 11-16-2004, 08:17 PM   PM User | #5
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
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.
Roy Sinclair is offline   Reply With Quote
Old 11-16-2004, 10:32 PM   PM User | #6
FastCougar
Regular Coder

 
Join Date: Jan 2004
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
FastCougar is an unknown quantity at this point
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.
FastCougar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:01 PM.


Advertisement
Log in to turn off these ads.