Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:57:07+00:00 2026-06-03T03:57:07+00:00

The Javascript reset method for forms is not supposed to affect hidden inputs ,

  • 0

The Javascript reset method for forms is not supposed to affect hidden inputs, but in IE8 and IE7 it does anyway. Does anyone know a way to make it behave properly?

I know I can do it by looping through individual inputs or by remembering the values before resetting the form and then restoring them but I am wondering if anyone can come up with a simpler way. Feel free to use jQuery if it will make your solution simpler. You can see an example at http://jsfiddle.net/Ddtz4/.

According to the author of the plugin, this is supposedly not an IE bug and the effect of the reset method on elements without initial values is undefined.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:57:08+00:00Added an answer on June 3, 2026 at 3:57 am

    I am thinking of something like this, using jQuery:

    $(document).delegate("form", "resetForm", function() {
        $(this).find("input[type=hidden]").each(function() {
            $(this).prop("defaultValue", $(this).val());
        });
        this.reset();
    });
    

    Whenever I want to reset a form, I can do this:

    $("#whateverForm").trigger("resetForm");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I'm trying to dynamically generate some inputs for my form, but it's not
JavaScript replace() Method Hello username !Don’t forget me this weekend! Username . When i
Not sure what I'm doing wrong, but here is the code 1: var currDoc:NotesDocument
This must be a simple problem but i can't figure out why it's not
I want to use javascript to display a hidden element on click, in each
Say your calling a REST service from your javascript code in the browser. Your
Is there a JavaScript library which allow me to perform all the REST operation
I created a WCF rest service, then called that from javascript using ajax. Now
Javascript/JQuery noob here, so apologies. I'm using .ajax to get a JSON object then
Javascript has built-in function for time where var date = new Date(); d.getHours() //gets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.