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

  • Home
  • SEARCH
  • 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 9161509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:58:56+00:00 2026-06-17T13:58:56+00:00

Have this function but it doesn’t seem to execute correctly. Here it is: function

  • 0

Have this function but it doesn’t seem to execute correctly. Here it is:

       function chooseCols(colTag,tagName) {
            // Set name column
            var column = $('.tagChooser:eq('+ colTag +')');         
            column.parents('.col').css('background','#EAF3EA');
            column.val(tagName);            
        } setTimeout(chooseCols(data.col_name,'colName'), 2000);

With execute correctly I mean that the right select option is not chosen and the background color of it’s parent stays the same.

OH btw, data.col_name is a json object I get from an ajax call. It gives me an index I can use for selecting the right .

Any tips are welcome!!

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-17T13:58:58+00:00Added an answer on June 17, 2026 at 1:58 pm

    Try this:

      function chooseCols(colTag,tagName) {
         // Set name column
         var column = $('.tagChooser:eq('+ colTag +')');         
         column.parents('.col').css('background','#EAF3EA');
         column.val(tagName);            
      } 
      setTimeout(function () {
          chooseCols(data.col_name,'colName');
      }, 2000);
    

    Your problem is because you invoke your function (chooseCols(data.col_name,'colName')) and pass undefined instead of function to setTimeout.

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

Sidebar

Related Questions

i have this picking function but it doesn't seems to work. the function should
I have this function for my comment system but it doesn't dynamically add the
I have this function which uses ajax, but this function doesn't work. I tried
I have this function or method in my class, but it doesn't return number
I have no idea why this doesn't work, but doing some validation functions and
So I have this function to strip out scripts from the page, but some
I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
This function works fine if I disable errors. But I have to solve them.
So I do have this loop, but it stops when it come to function
I have a function like this void doSmth(Long... paramg){ } But I can't pass

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.