Hello, I am having a heck of  a time getting started with this system.  
I have an existing PHP application that I need to start migrating to the 
AJAX way of doing things.

I created the hello world application and have been reading 
documentation.  I am trying to start with something super simple: 
perform an AJAX request.  Simple enough, right?

So I am mucking about with a couple changes to the hello world 
application I set up.

Here is what I changed in Application.js.  The server is at 
192.168.10.180 on port 80 and I've setup the PHP JSON RPC server from 
qooxdoo-contrib.  PHP is already working fine.  However since I can't 
quite get qooxdoo to actually make a request it is difficult for me to 
verify the client side of things.  RpcExample is even a little too 
complex for what I'm looking at starting with right now.

Can anyone tell me why this doesn't work?

      // Create a button
      var button1 = new qx.ui.form.Button("Send Rpc Request", 
"simwebui/test.png");
      var rpc = new qx.io.remote.Rpc();
      var mycall = null;
      //var container = new qx.ui.container.Composite(new 
qx.ui.layout.Basic());

      // Document is the application root
      var doc = this.getRoot();
   
      // Add an event listener
      button1.addListener("execute", function(e) {
        button1.setEnabled(false);
        rpc.setUrl("http://192.168.10.180/services/";);
        rpc.setServiceName("qooxdoo.test");
        rpc.setCrossDomain(true);
        try {
          var result = rpc.callSync('echo', 'blabla');
          alert("Sync result: " + result);
        } catch (ex) {
          alert("Sync exception: " + ex);
        }
        button1.setEnabled(true);
        //alert("Hello World!");
      });

      // Add button to document at fixed coordinates
      doc.add(button1, {left: 100, top: 50});

It just immediately comes back with an alert proclaiming: "Sync result: 
null"

What am I doing wrong?  Any assistance would be greatly appreciated!

Thanks!



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to