Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How to clear browser form fields

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-08-2009
Member
 
Join Date: Aug 2008
Posts: 90
How to clear browser form fields

I have developed an web application form where i have created number of fields where user need to enter their details and submit the form, that form details we will keep for our reference and as per their requirement we will forward them the News and other related article. But when i test for that form implementation the fields displayed in them get clear. And I cannot achieve my goal. Please help me.
Reply With Quote
  #2  
Old 29-08-2009
Justvicks's Avatar
Member
 
Join Date: Feb 2006
Posts: 130
Re: How to clear browser form fields

set the Form variable at the top to be the name of the form on your page. To add the script to your GoLive page, add a Script object to the head section of your page. Firefox extension that allows you to right click form text inputs and clear their contents Clear Text Fields will allow you to right click form text inputs and clear their contents. Then use the defaultVals variables at the top of the script to enter the field names and default values for as many fields as you need. Make a new line for each field that has a default value, so...

defaultVals[0] = new Array("name", "(your name here)");
defaultVals[1] = new Array("email", "(your email address here)");
defaultVals[2] = new Array("phone", "(your phone number here)");

...loads up three field (name, email and phone) with their default values (inside the double quotes). If you have any quote marks in the default text, you'll need to escape those with a backslash \"
Reply With Quote
  #3  
Old 29-08-2009
PARRISH's Avatar
Member
 
Join Date: Jan 2006
Posts: 174
Re: How to clear browser form fields

Keep in mind that if you have other events attached to your body tag, This is standard Postback behavior that is very useful when you have server-side validators.

You have two options:
  1. when the email is successfully sent, clear all fields
  2. do a redirect (to the same url), after sending.

To Clear a form in a browser using Adobe You may Do either of the following things:
  • Select the reset form button, if one exists. You cannot undo this action.
  • Quit the browser, and start again.

Clicking the web browser’s Reload or Refresh button, the Back or Go Back button, or following a link to another page may not completely clear the form.
Reply With Quote
  #4  
Old 29-08-2009
X-Ray's Avatar
Member
 
Join Date: Mar 2008
Posts: 192
Re: How to clear browser form fields

You can clean AutoComplete manually or using special software. the email might get sent again (this empty page was the result of a form submission, refresh submits the original form again Clear All History protects your privacy and clears AutoComplete forms content in Internet Explorer, MSN Explorer, Firefox, Maxthon (MyIE2), Opera, Netscape and Mozilla.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to clear browser form fields"
Thread Thread Starter Forum Replies Last Post
Drupal : Add new fields in the form of user / register Arrosa Software Development 6 05-01-2011 05:11 AM
How to Auto Populate fields from sub form to form? mich43 Windows Software 6 09-11-2010 11:29 PM
Some fields appers blank in Adobe form Gimelstob Windows Software 7 29-06-2010 03:02 AM
How to update fields in a protected form in Word 2007? Zavier Windows Software 5 14-03-2010 04:33 AM
Form fields become yellow in Firefox Caiden Technology & Internet 3 29-07-2009 01:00 AM


All times are GMT +5.5. The time now is 11:09 AM.