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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:11:08+00:00 2026-06-16T09:11:08+00:00

I have onClick event in my image which causes new tabs to be added

  • 0

I have onClick event in my image which causes new tabs to be added to jQuery tabs. The event next to it will add content to this new tab.

$('#Image').click();
$('#controladdedbyclickabove').append( message);

The problem I am seeing is that the click event will not wait for the actions to complete it will continue to next statement. Due to this I cannot see the content being added to the new control that the click would have generated. How do I make the click event to wait for actions to complete before it moves to next statement?

T have to depend on triggering the click because the onClick action on #image has all parameters which I can extract as a string, but I’m not sure how to execute it.

When onClick event happens, this method is called:

function addTab(title, uri, userid) {
    var newTab = $("#tabs").tabs("add", uri, title);
}
  • 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-16T09:11:09+00:00Added an answer on June 16, 2026 at 9:11 am

    you can use callback function:

     if($('#Image')) {
      $('#Image').click(function() {
            $('#controladdedbyclickabove').append( message);
      });
    }else {
      console.log('image object not there');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this jquery code to add the onclick event to minimize and maximize
I have a div which I have attached an onclick event to. in this
I have a div section in which I have an image whose onclick event
In my HTML page I have an onClick event which navigates to next page.
I have a strange problem where an onclick event on an input image is
I have an asp button with no onclick event but only onclientclick. This call
I have a button. Its OnClick event calls a procedure which destroys the button,
I have this strange issue. I have an image which I rotate about a
I have an Image button. I made it invisible. But the onClick event is
I have a javascript function that I am calling from an image onClick event

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.