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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:44:16+00:00 2026-05-26T15:44:16+00:00

I have a form, the first .class has 5 input:text boxes in it. I

  • 0

I have a form, the first .class has 5 input:text boxes in it. I want to be able to clear all the text boxes with the click of a button. I’ve tried it a few ways and it’s not working… here’s what I’ve done…. (FYI, I have more classes in the form so I can’t use .reset.

The Form…

<table class="orderLine1 formFont" width="900">
 <tr>
    <td width="395">Product Name:<br><input class="ProductName" type="text" size="65"></td>
    <td width="97" class="formFontDisabled">Prod ID:<br><input class="Product_ID ffd" type="text" size="5" disabled></td>
    <td width="78" class="formFontDisabled">UPC:<br><input class="UPC ffd" type="text" size="13" disabled ></td>
    <td width="67" class="formFontDisabled">List Price:<br><input class="ListPrice ffd" type="text" size="7" disabled></td>    
    <td width="67">WholeSale:<br><input class="WholeSalePrice ffd" type="text" size="7" disabled></td>
    <td width="56">Quantity:<br><input class="qty addLine" type="text" size="7"></td>
    <td width="60" class="formFontDisabled">Line Total:<br><input class="subTotal ffd" type="text" size="10" disabled></td>
    <td width="44"><button class="OFDeleteButton">Delete</button><button class="OFClearLine" >OFClearLine</button></td>
  </tr>
</table>

The Script Test # 1

   $(document).ready(function(e) {
    $(function clearFirst() {
         $('.orderLine1').find(':input').each(function() {
             switch(this.type) {
                 case 'text':
                    $(this).val('');
                    break;
                 }
             });
        });

    $('.OFClearLine').click(function(e) {
        clearFirst();
    });
    });

The Script Test # 2

  $(function(){
        $('.OFClearLine').bind('click', function(){
            $('.orderLine1').reset();
        });
    });

More info: OFClearLine is the class for the button I want to use & orderLine1 is the class of the form.

Thanks in advance!

  • 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-05-26T15:44:17+00:00Added an answer on May 26, 2026 at 3:44 pm
    $(function() {
      $('.OFClearLine').click(function() {
        $('.orderLine1 input[type="text"]').val('');
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page like this: <form class=ajax method=post action=add_item.php> [text input] [submit button]
Currently I have two pages: The first page contains an input form, and the
I am trying to have a form of text inputs. All inputs will in
I have a TextBox input element that has a RequiredFieldValidator as such: <div> <label>First
I have this form Im creating and when you click on the Next button
I have a form that has a required input, but jQuery is saying that
Say I have this simple form: class ContactForm(forms.Form): first_name = forms.CharField(required=True) last_name = forms.CharField(required=True)
I have a MOSS workflow where on the first form, the user can choose
Let's say I have a form that collects a first name and a last
in my application i have an form where user enter their username first .

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.