Using a cross-domain URL in your application

Besides AjaxProxy , ScriptTagProxy is the other server proxy which helps us to persist the model on a remote server and load it from the same. The only catch is that this proxy is used only when the domain where the server is running is different from the domain where the application is running, for example, loading the search detail from the Google Custom search API. This recipe outlines the usage of ScriptTagProxy to make cross-domain URL calls.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch05_14.js and paste the following code into it:
    Ext.setup({ ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.