this.callback javascript

Posted on 2011-09-14
Last Modified: 2012-05-12

As per my knowledge

 var my_alert = function ShowAlert() {  
            alert("This is the test message");  

Open in new window

is call back but I am not sure what is this,callback().

Please advice.

Karan Gupta
Question by:KaranGupta
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 75

Expert Comment

by:Michel Plungjan
ID: 36540864
Please show some context.
LVL 40

Expert Comment

ID: 36540877
check this link for some good discussion

example that you posted is more of a delegation than callback.
Callback is mostly used for asynchronous execution to make sure that there is some method waiting for execution when the original method returns back.

For example, call back methods for ajax calls
LVL 40

Accepted Solution

gurvinder372 earned 167 total points
ID: 36540881

Assisted Solution

h4hardy earned 167 total points
ID: 36540895
Hi karan,

here is the good article to get the better idea about the callback function JavaScript,

Assisted Solution

by:Kishan Zunjare
Kishan Zunjare earned 166 total points
ID: 36545017
Callback functions are used in JavaScript (JS) extensively. They are required for AJAX/XHR, event handling, and in popular JS libraries.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap question 4 32
How to check or uncheck a checkbox using the id of the checkbox 2 20
Glitching Slide Show 19 27
Add somewhat of a wildcard to your javascript 12 30
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question