[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

this.callback javascript

Posted on 2011-09-14
5
Medium Priority
?
204 Views
Last Modified: 2012-05-12
Hi

As per my knowledge

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

Open in new window


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

Please advice.

Regards
Karan Gupta
0
Comment
Question by:KaranGupta
[X]
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
5 Comments
 
LVL 75

Expert Comment

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

Expert Comment

by:Gurvinder Pal Singh
ID: 36540877
check this link for some good discussion
http://stackoverflow.com/questions/483073/getting-a-better-understanding-of-callback-functions-in-javascript

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
0
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 668 total points
ID: 36540881
0
 
LVL 4

Assisted Solution

by:h4hardy
h4hardy earned 668 total points
ID: 36540895
Hi karan,

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

http://pietschsoft.com/post/2008/02/JavaScript-Function-Tips-and-Tricks.aspx
0
 
LVL 7

Assisted Solution

by:Kishan Zunjare
Kishan Zunjare earned 664 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.

http://onemarco.com/2008/11/12/callbacks-and-binding-and-callback-arguments-and-references/
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

656 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