SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 28th, 2004, 03:36 PM
sintrigue sintrigue is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 12 sintrigue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Empty <TEXTAREA> on refresh?

Hi, is there any way to empty the contents of a text area form once the form is submitted and the same page is displayed? Right now, when someone submits a form on my web page, it sends me the comments. However, if they "refresh" or "reload" the page, the same information is submitted again. I've been trying to prevent this for weeks, but can't seem to do so. Any assistance would be much appreciated!

Best,

Sintrigue

Reply With Quote
  #2  
Old June 28th, 2004, 03:55 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
I don't know if it will be possible using javascript, but with some serverside language it should be possible. What language are you using?

Reply With Quote
  #3  
Old June 28th, 2004, 06:48 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Once you have finished processing the form results, use a server-side language to redirect the user back to the form.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #4  
Old July 1st, 2004, 02:26 PM
sintrigue sintrigue is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 12 sintrigue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the replies. I'm using PHP right now to process the data. Only problem is the form is redirected back to the main page where the form is.... Thanks again for any help, and all the suggestions so far.

Sintrigue

Reply With Quote
  #5  
Old August 12th, 2004, 04:31 AM
Fla$h Fla$h is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 Fla$h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The reason for the information appearing in the textarea when the user is redirected to the page is because the information is cached on that page when its sent to the server. I suggest that on the page where you have your textarea that you disable the caching.

a simple meta tag will do this:
<meta http-equiv="pragma" conent="no-cache">

Hope this helped you!

Reply With Quote
  #6  
Old December 22nd, 2004, 08:38 AM
razvan razvan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 razvan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ideea

Hi, You can use cockie and sleep(). This alow you to store the textarea content in the browser memory. You can build a function who can read from <textarea> and write the content in a cookie. Than with a loop you can ask for the funtion and set a timeout with sleep. Also you have to build a function to read the cockie. Good look.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Empty <TEXTAREA> on refresh?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway