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, 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 ...
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...
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...
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...
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...
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...
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
...
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 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!
...
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...
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 ...
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.
...
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...
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 ...
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 ...
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 ...
$.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 ...
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...
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...