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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:34:18+00:00 2026-06-10T21:34:18+00:00

I have a table populated from a selection from a dropdownlist. If the status

  • 0

I have a table populated from a selection from a dropdownlist. If the status of any of the items in the table is anything other than ‘success’, I want to disable a button on the page, otherwise I enable it. I have a change event handler with the following:

function enableButton() {
    $(".myButton").attr("disabled", true);
    $("td.tdStatus").each(function() {
        if ($(this).text() == "SUCCESS") {
            $("input.myButton").attr("disabled", false);
            return false;
        }
    });
}

$(function() {
    $("#myList").change(enableButton);
});

On the first selection of an item from the dropdown, I’m getting into the event handler but $("td.tdStatus").each(function() isn’t finding anything. When I then make a subsequent change to the dropdownlist, the button gets enabled/disabled as I’d expect. Any ideas why the first change isn’t working?

HTML is as follows:

<ItemTemplate>
    <tr>
        <td runat="server" id="tdName"><%# Eval("Name") %></td>
        <td class="tdStatus"><%# Eval("Status") %></td>
    </tr>
</ItemTemplate>

Thanks

  • 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-10T21:34:20+00:00Added an answer on June 10, 2026 at 9:34 pm

    Just to give an update, the tab the data is loaded into has a function that is bound to the tabsload event:

    $(“#tabContent”).bind(‘tabsload’, tabLoaded);

    Inside tabLoaded I put a call to the enableButton() function and that’s got it working ok, with the data completely loaded before the function fires. Thanks all for your help, apologies for missing out the key information in the original post!

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

Sidebar

Related Questions

I have a large table that get populated from a view. This is done
I have a table which is being dynamically populated from MySQL. The table has
I have a table Survey_Data_Response that is populated with an 'insert into' statement from
I have a table, named ReportingPeriods , that I want to be populated entirely
I have a table populated with time stamped rows inserted at (essentially) random point
I have a table (in a form) populated with radio buttons (with a button
I have a table which is being dynamically populated, each row contains two textfields
Lets say we have a table here, populated with the following data: acc_id1 acc_id2
So I have a table Links of links, that was initially populated using Nokogiri.
The tableview is populated from a .plist. I want to be create an ADD

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.