Results 1 to 4 of 4

Thread: How to clear browser form fields

  1. #1
    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.

  2. #2
    Join Date
    Feb 2006
    Posts
    172

    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 \"

  3. #3
    Join Date
    Jan 2006
    Posts
    211

    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.

  4. #4
    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.

Similar Threads

  1. Drupal : Add new fields in the form of user / register
    By Arrosa in forum Software Development
    Replies: 6
    Last Post: 05-01-2011, 05:11 AM
  2. How to Auto Populate fields from sub form to form?
    By mich43 in forum Windows Software
    Replies: 6
    Last Post: 09-11-2010, 11:29 PM
  3. Some fields appers blank in Adobe form
    By Gimelstob in forum Windows Software
    Replies: 7
    Last Post: 29-06-2010, 02:02 AM
  4. How to update fields in a protected form in Word 2007?
    By Zavier in forum Windows Software
    Replies: 5
    Last Post: 14-03-2010, 03:33 AM
  5. Form fields become yellow in Firefox
    By Caiden in forum Technology & Internet
    Replies: 3
    Last Post: 29-07-2009, 12:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,056,365.40400 seconds with 17 queries