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 8248063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:04:16+00:00 2026-06-07T23:04:16+00:00

I have a very lengthy form with multiple steps. User needs to be able

  • 0

I have a very lengthy form with multiple steps. User needs to be able to click Reset in case they need to start over fresh.

I’ve implemented a very basic javascript like the one below:

<script type="text/javascript">
  function resetOnlyThese(){
  document.getElementById('room_str').selectedIndex = "";
  document.getElementById('qty_str').selectedIndex = "";
  // ...
  }
</script> 

<input type="button" value="Reset" onclick="resetOnlyThese()">

and I am using AJAX to update the form with calculations for price which displays in a SPAN.

<span class="totalprice-placeholder"></span>

All of the radios, input fields, and dropdown boxes reset perfectly but the price calculation generated from the successful AJAX callback remains the same. Is there a way to reset the callback part too?

Thank you.

  • 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-07T23:04:17+00:00Added an answer on June 7, 2026 at 11:04 pm

    I found this script which loops through all the elements and resets them all very simply.

    <script type="text/javascript">
    function clear_form_elements(ele) {
        $(ele).find(':input').each(function() {
            switch(this.type) {
                case 'password':
                case 'select-multiple':
                case 'select-one':
                case 'text':
                case 'textarea':
                    $(this).val('');
                    break;
                case 'checkbox':
                case 'radio':
                    this.checked = false;
            }
        });
    
    }
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very very big html page/data. I need to fetch data under h1
I have a form with several buttons on it and when the user presses
I have a form to edit employee information. If the user wishes to enter
I have a very strange problem when I try to implement click on table
We have a very strange problem which we have yet to be able to
I have a form where if the user changes the platform (operating system), an
I am posting a very simple form using a method I have used frequently
I am working on xml files, as i have very lengthy xml and i
I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
i have very serious problem if any tech expert can help...thank you in advance..

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.