2 Replies Latest reply on Feb 14, 2013 6:41 AM by Robert Galvin

    asl.run not able to handle the response.



      I am new to SB1 developement and trying to complete my first app

      We have webservices written in php in JSON.

      As per my understanding we need asl.jun to execute the webservices from the device.

      My main challenge is that i am not able to capture the response.


      For instance i mentioned this sample code (given in the pdf) in my index.hml in onload service..


      {‘taskId’: ‘1024’}, function(){




      Now the issue is i am not able to get the alert message at all. i am just viewing the response which is written by my url.

      My objective is to handle the response json in the callback function but its not even getting executed.


      Any help would be really appreciated.


      Thank you,


        • Re: asl.run not able to handle the response.
          Robert Galvin

          You should not be using asl.run to do this. You should use standard Javascript methods for doing Async HTTP Gets to your webservice and handle the response/parsing in Javascript. This is not unique to SB1 but just as you would normally if the application was a HTML/JS app. Google around for Javascript Async JSON and you will find lots of ways to do this.Asl run is more for launching other 'SB1 Apps' not for doing traditional HTTP gets to web services.