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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:49:08+00:00 2026-05-21T19:49:08+00:00

I have a webform to input a contact’s physical address that I am styling

  • 0

I have a webform to input a contact’s physical address that I am styling with jQuery UI. In my application code, I check to see if there is a secondary address line (like Apartment or Suite number), and show or hide a secondary address line accordingly by hiding the element. I also have a jQuery UI “Plus” Button to add an additional line on new or existing forms, which only displays one line by default. The secondary line has a Minus button exactly the same as the Plus button to remove the secondary line if necessary.

If the user clicks on the Plus button, the secondary line appears, and the Plus button is set to disabled.

The form also has a standard HTML reset button to reset the form to default values. Everything is working fine with my added javascript, except when there is a secondary address line visible (so the Plus button is set to disabled). If the reset button is clicked when the plus button is disabled, it gets set to enabled, even when there is a secondary street address line visible and it should be disabled.

I’ve set up a simple form to show this behavior here: jQuery UI Reset Button Form. By default, this form should have the Plus button disabled, and if you click on the reset button, it will become enabled as I’ve explained.

How do I prevent the HTML form from enabling the button when it shouldn’t be?

  • 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-21T19:49:09+00:00Added an answer on May 21, 2026 at 7:49 pm

    Nice challenge. Reset event ‘restores’ elements to its initial state, so your add_address_line anchor must start with a disabled attribute.

    So your initial markup shoud be this:

    <a id="add_address_line" disabled="true" ...></a> 
    

    With this, when the form resets, your a will return to disabled state.

    Hope this helps. Please tell me if it doesn’t work (it should), I have a B plan hehe.

    EDIT: As reset doesn’t affect anchors, you can bind the reset event (B plan):

    $("#myform").bind('reset', function(){
       setTimeout(function(){  //This is needed
          $("#add_address_line").button("disable");
       }, 10);
    });
    

    The setTimeout is necessary for a cross browser solution, because in some browsers, the reset event fires before elements actually reset. With that small delay, it’s done.

    Cheers

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

Sidebar

Related Questions

I have a simple webform that will allow unauthenticated users to input their information,
I have a .NET webform that has a file upload control that is tied
On my C# asp.net webform I have a search page that has roughly 20
We have a pretty big ASP.NET WebForm (web application) project with a lot of
I have an ASP.NET Webform and inside the form I have an input type
I have to create a webform that looks something like this column column -
Good Morning, I have created an ASP.NET 3.5 webform that allows users to search
Hy, I am implementing a asp.net web application, and I have two webform files,
Say I want to have a simple web app that takes some user input,
I have a webform with many input, checkbox, hidden, etc... elements and I am

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.