callback

How does an XMLHttpRequest response get routed to the right browser-callback?

Hello. I have made webpage that uses Ajax to update some values without reloading the page. I am using an XMLHttpRequest object to send a POST request, and I assign a callback function that gets called when the response arrives, and it works just fine. But... how in the world does the browser know that some data coming from some ip:por...

In Perl how do you dynamically pick what method to use as a callback?

In Perl, it's pretty trivial to specify a callback or code reference if its package is known: package Foo; sub foo { print "in foo" } # and then package main; sub baz { my $code = shift; $code->(); } baz( \&Foo::foo ); And this prints in foo. Lets say you have an object, ever so trivial, like this: package Foo; sub new ...

How does XMLHttpRequest know when to invoke its callback?

Hello. From what I understand, if client side javascript code uses the XMLHttpRequest to make a POST request, it waits for a response and when it completes it changes its readystate to ReadyState.Complete and invokes the callback function. My question is: How does it determine that the response is complete? Does it return the content...

Cannot collect alle results of asynchronous call with geo.getLocations (Google Maps)

Below is my code. The problem is that recordsOut[0] is always undefined, whatever I try. I know it has to do with the callback result. I tried to add some delays to give it more time to give a result back, but that did not help. Any idea (with example please)? Very much appreciated. function getAddress(id, searchValue) { geo.getLo...

What steps do I need to take to use WCF Callbacks?

I am trying to learn WCF. I have a simple client and server application setup and upon pressing a button on the client, it gets an updated value from the server. My next step is I am trying to do a callback from the server to the client to update its value. I have poured through many examples, and they just seem too big and confusin...

Calling back to VBScript from C#

Hi, I'd liked to know whether it is possible to call a function in VBScript from C#. Let me try to clarify. I'm using an application (Quick Test Professional or "QTP") that automates another application, mostly using VBScript. There is the ability, via an add in model, to extend the test functionality by writing add-ins to the testing...

Callback unmanaged code from managed C#

Bit of a history lesson here. I'm working on a legacy C++/MFC application and am trying to start a incremental modernization by pushing components written in C# (WinForms and later WPF). I'm stucking using .Net/1.1 and VS/2003 for many reasons which are impossible to resolve in the near future. Currently, as a proof of concept, someth...

How can I assign a callback function to an asp:HyperlinkField?

I want people to click on a link (generated from an asp:HyperlinkField) and have it call a method on the server rather than redirect the user somewhere. Anyone know how to do this? Thanks, Matt ...

CGI-call to .aspx page

Hi, I have the following scenario. I have created an ASP.NET web application (framework 3.5) for my company, which allows users to purchase goods or services. Then, the user clicks on "Proceed to Payment", which calls an external payment site. The user then enters the card details through this site. The payment site are performing a CG...

How to add hooks in twisted.web (or twisted.web2)?

How can I add a hook before and after processing a request on twisted.web (twisted.web2 is fine too)? The equivalent of webpy's: app = web.application(urls, globals()) app.add_processor(web.loadhook(my_attach_callback)) app.add_processor(web.unloadhook(my_detach_callback)) Thanks! ...

Issue with Callback method and maintaining CultureInfo and ASP.Net HttpRuntime

Hi All, Here is my issue. I am working on an E-commerce solution that is deployed to multiple European countries. We persist all exceptions within the application to SQL Server and I have found that there are records in the DB that have a DateTime in the future! We define the culture in the web.config, for example pt-PT, and the forma...

What is the syntax for creating a queue subscriber in PL/SQL?

I'm trying to create a queue and a callback that triggers when a message is queued, but I can't get the callback to trigger. What am I doing wrong? I have a trigger that enqueues a message, and I can see it on the queue message table, and I can dequeue it by hand and process it, I just can't get the callback to fire on enqueue. BEGIN ...

callback dock demo in Miglayout

can anyone suggest where i can get a hold of the source code for the callback dock demo application in Miglayout site. such a tutorial would also be ok. thanks. ...

Strange behaviour migrating sessions with callbacks from php4 to php5

I have to migrate a php4 app that uses session_set_save_handler() to php5. In php4 everything was fine, but in php5 the callback functions cannot access the global vars anymore, which were set on the page before session_set_save_handler() was called. In the example below the global var $g1 cannot be accessed in the session_writer() (wh...

Where is my 'this'? Using objects method as a callback function.

Hello, I have a generic question about javascript specification or implementation of functions pointer (delegates?) which are points to object methods. Please, read the following code snippet. Here we have an object with a method using 'this' to access an object field. When we call this method as usual (o.method();), returns value of ...

How can I pass a function by reference for a report callback in C++/CLI?

I have some code which handles data files and reports an error when it runs into trouble, but I'm having trouble working out how to give my class a callback function. Here's a quick example of the sort of thing I'm trying to achieve: public delegate void Reporter( System::String^ stringToReport ); /// <summary> /// Simple file handler ...

Timeout occuring when sending business object through WCF Callback

I have a WCF service implemented with a call back contract that I am trying to send a business object through. I have the business object decorated with DataContract() and DataMember() attributes, and it contains the following number of properties: ints: 3 strings: 4 XElement: 1 other objects: 5 (also decorated with DataContract() and ...

Scope problem with nested $.getJSON

$.getJSON('http://twitter.com/followers/ids.json?screen_name=/…'+ query1 + ' $.getJSON('http://twitter.com/followers/ids.json?screen_name=/…'+ query2 + ' f2=data1; f1=data; for(var i=0; i "less than" f1.length; i++) { for(var j=0; j "less than" f2.length; i++) { if ...

How does one return data to the original caller function in Javascript?

I have a problem returning data back to the function I want it returned to. Code below: function ioServer(request_data, callback) { $.ajax({ cache: false, data: "request=" + request_data, dataType: "json", error: function(XMLHttpRequest, textStatus, errorThrown){}, success: function(response_d...

C Sockets Ping Command?

Can someone point me to some tutorial on how to set up a ping method using C sockets? Using beej's guide, I've been able to set up a connection between two devices, but now I want to setup a method that pings for all available devices before starting an actual connection. I've never done this before, so would you do something like set up...