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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:27:01+00:00 2026-05-26T23:27:01+00:00

What I have today is a script I’ve inherited, and can’t remove to go

  • 0

What I have today is a script I’ve inherited, and can’t remove to go with something else for the time being at least. Which normally would be fine, however the author of the original script “packed” it so the code is far from readable. With that the script lacks functionality I am now required to put it despite my protest of it not being all to possible with the code base as is. So I am not trying to come out with workarounds. This moments work around notion is based off of a button click I can’t alter.

What the button does is open a file dialog, where the user selects a file, and upon selection it gets added to a Unordered List (UL). While trying to think of hacks I came up with the idea what if just like a “select” form element you can do an onChange event trigger so when a user selects something there. Something does something. So I am wondering if I can achieve something similar. Something that will in a sense listen to the DOM see when that particular element changes and if its being added to run one of the post checks I want to run. I don’t know how to look that one up. So I am wondering if anyone here may have some insight for me.

  • 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-26T23:27:01+00:00Added an answer on May 26, 2026 at 11:27 pm

    Try using $.doTimeout() to ‘listen’ to changes in the </ul> and run a function if a </li> gets added like this:

    // The List //
    <ul class="theList">
        <li>Some Value</li>
        <li>Some Value</li>
        <li>Some Value</li>
    </ul>    
    
    // Set Initial </li> Count //
    var li = $('.theList li').length;
    
    $('.theList').doTimeout('check', 250, function(){
        if ($('.theList li').length > li)
        {
            // ...Run Function Here... //
    
            // Update Total </li> Elements //
            li = $('.theList li').length;
        }
    
        // Return True to Continue Polling //
        return true;
    });
    

    I hope this helps!

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

Sidebar

Related Questions

I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the
I’m working on a Scala script which uses Joda Time. Up until today, this
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I have a script , which has been causing me quite some issue today.
Today I have noticed that the order in which the $lt and $gt operators
greetings, today i have started to learn java using netbeans ide. i would like
Today I have a bit of a problem. I have an ajax script that
I have a new challenge today. I will develop a script that will take
I have the following php script that is called by jquery ajax function report_range($time,
Today, I have written a perl script, as the following code: my @files =

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.