1. #1
    Ext User
    Join Date
    Jan 2011
    Posts
    33
    Vote Rating
    0
    nileshbhd5 is on a distinguished road

      0  

    Default XMLHttpRequest cannot load.. Error

    XMLHttpRequest cannot load.. Error


    When i try to read an XML file it gives me following error ::

    XMLHttpRequest cannot load http://abc.om/app/a3/.

    Origin http://abc.com is not allowed by Access-Control-Allow-Origin.


    Is there any solution to this problem ? My code looks like below...

    Code:
    Ext.regModel('HitrateRegel',{
    fields:[
    {name:'catId',type: 'string'},
    {name:'title',type: 'string'}
    ]
    });
    
    var HitrateStore = new Ext.data.Store({
    model: 'HitrateRegel',
    proxy: new Ext.data.HttpProxy({
                        method: 'GET',
                        url: 'http://abc.om/app/a3/'
                    }),
                    reader: new Ext.data.XmlReader({
    				type: 'xml',
    				record:'category'
                        }),
    listeners: {
    load: function(store, records, success) {
    console.log(store);
    console.log(records);
    console.log(success);
    }
    }
    });

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    19
    Vote Rating
    0
    tmanderson is on a distinguished road

      0  

    Default


    If your application itself does not reside on abc.com, you cannot use javascript to directly access the information. You'll have to create a proxy script.

  3. #3
    Ext User
    Join Date
    Jan 2011
    Posts
    33
    Vote Rating
    0
    nileshbhd5 is on a distinguished road

      0  

    Default


    Hello i think i have used proxy script here
    Code:
    proxy: new Ext.data.HttpProxy({
    ?

    Quote Originally Posted by tmanderson View Post
    If your application itself does not reside on abc.com, you cannot use javascript to directly access the information. You'll have to create a proxy script.

  4. #4
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    I believe tmanderson was either referring to a JSONP request or a script on the same website as your application that will fetch the data from abc.com and return it as a result. This latter script would run on the server-side, not as a javascript application in your browser. Unless I'm reading that wrong.

    You might always want to read from #9 onwards here:
    http://www.sencha.com/forum/showthre...668#post562668

  5. #5
    Ext User
    Join Date
    Jan 2011
    Posts
    33
    Vote Rating
    0
    nileshbhd5 is on a distinguished road

      0  

    Default


    Ok is there any tweak to that i mean using ajax or something will that work in sencha ?

    Quote Originally Posted by jep View Post
    I believe tmanderson was either referring to a JSONP request or a script on the same website as your application that will fetch the data from abc.com and return it as a result. This latter script would run on the server-side, not as a javascript application in your browser. Unless I'm reading that wrong.

    You might always want to read from #9 onwards here:
    http://www.sencha.com/forum/showthre...668#post562668

  6. #6
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    Sencha is a CLIENT-SIDE technology. It does not run SERVER-SIDE. As such, it can only do things that the browser lets it do. Your only hope is what I described above.

  7. #7
    Ext User
    Join Date
    Jan 2011
    Posts
    33
    Vote Rating
    0
    nileshbhd5 is on a distinguished road

      0  

    Default


    Thanks for the answer. I am trying to develop an application using sencha with phonegap, so in that case if someone access my iphone application from where they will get the data ? I mean the XML has to be feed from an IP address. So Sencha wont work in this case ? Since a mobile client is calling a url.. ?

    Quote Originally Posted by jep View Post
    Sencha is a CLIENT-SIDE technology. It does not run SERVER-SIDE. As such, it can only do things that the browser lets it do. Your only hope is what I described above.

  8. #8
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    Sorry, I can't speak for phonegap. Never used it. It might have some way to get around this by running its own mini webserver. Hopefully someone else can answer. You might also have to ask the phonegap folks. It won't matter if it's sencha touch or some other javascript code, you'll run into the same issue.

Similar Threads

  1. Load Ext js via XMLHttpRequest
    By rubenbentein in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 2 Apr 2009, 2:40 PM
  2. XMLHttpRequest.Open(...);
    By iTzAngel in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 26 Jan 2008, 1:34 PM
  3. XmlHttpRequest transaction abort
    By bnumnum in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 28 Jul 2007, 4:07 AM
  4. How to display an error message in case of Combox load error?
    By memph in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 27 Jul 2007, 8:39 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi