Code Monkey home page Code Monkey logo

snippets's Introduction

misc-code-snippets

A collection of miscellaneous code snippets.

snippets's People

Contributors

bitdeli-chef avatar dhilipsiva avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

apratimankur

snippets's Issues

iPhone UIWebView is not loading a data using easyXDM.

Hi All,

I have a javascript code which downloads a data from the third party server. I have used easyXDM to load the data.

My Html page has a following java script code to pull the data from server ( Cross Domain Server ).

This approach works fine when i run the html page in normal browser. When i run the same html page through iPhone UIWebView then it fails to load the data as request are not going through at all.

I am using Apache Cordova iOS library for my test app.

// My Sample Javascript code for making easyXDM Call
WebService.requestHandler = function(requestProp){
WebService.callback = requestProp.callBack;
// loading.....

var socket = new easyXDM.Socket({ 
    remote: "cross domain URL ",
    onMessage: function(response, origin) {
        try{
            var responseData = {};
            if(response.indexOf("jsoncallback(") !== -1) {
                response = response.replace("jsoncallback("," ");
                response = response.substring(0, response.length-1);
            }
            responseData = $.parseJSON(response);
                    }
                    break;
                }
            }
            // stop loading indicator...
            WebService.callback(responseData);
        }catch(e){}
        socket.destroy();
    }
});

};

When i run the app i am not able to see the request which is going through my app.

Is there any restriction for web view in iPhone to load easyXDM data.?

Cheers,
Shailesh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.