• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

call back function

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is call back function in the context of Javascript?

How to use it? When to use it?

Please can any body provide simple/sample code?

Thanks.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why does it sound like I am answering homework or interview questions with your posts?

Look into submit() or Ajax

Eric
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:

Look into submit() or Ajax

Eric



Sorry, I didn't get.


 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call back functions are functions which you dont directly call but called by some one else. Take AJAX for example , you can define a function which gets called when response to a request is receieved. You must be familiar with init() and destroy() of Servlet API ?
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradip Bhat:
Call back functions are functions which you dont directly call but called by some one else. Take AJAX for example , you can define a function which gets called when response to a request is receieved. You must be familiar with init() and destroy() of Servlet API ?



Thanks Pradip,

Yes, I am familiar with init() and destroy(), they are called by container (we don't call it ourself).

"you can define a function which gets called when response to a request is receieved"

How to do that? Any link which explain this in detail?

Thanks a lot.


 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.degraeve.com/reference/simple-ajax-example.php

check for the onreadystate callback function.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradip Bhat:
http://www.degraeve.com/reference/simple-ajax-example.php

check for the onreadystate callback function.



Sorry Pradip.

But still I didn't understand, how to write my own call back function?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do we have to feed you the exact answers for all of your questions lately? There are thousands of tutorials on Ajax out there. Please do a search on google and try to figure it out for yourself. It really is not that hard to do.

Eric
 
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic