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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now