Results 1 to 5 of 5

Thread: Loading an external website in a panel

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Location
    Italy
    Posts
    78

    Default Loading an external website in a panel

    I'm trying to load ad external website in my panel (e.g. www.google.com). With a page that is on the same host, it works fine.

    PHP Code:
        var tp Ext.getCmp('pannellocentrale');
            var 
    tab tp.add({
                
    title'Report',
                
    closabletrue,
                
    id'report',
                
    autoLoad: {
                    
    url'http://www.google.com',
                    
    scriptstrue
                
    }
            }); 
    With the url as in the code, I get this error:
    XMLHttpRequest cannot load http://www.google.com/. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

    If I try with url: 'www.google.com' I get:
    GET http://localhost/datarise/www.google.com 404 (Not Found)

    As last solution, I also tried to call an HTML page with redirect:
    PHP Code:
    <html>
       <
    head>
          <
    title>foo</title><meta http-equiv="Refresh" content="0; url=http://www.google.com">
       </
    head>
       <
    body></body>
    </
    html
    but nothing, I have always the spinnig wheel with Loading...

  2. #2
    Sencha User walldorff's Avatar
    Join Date
    Mar 2008
    Location
    Antwerp, Belgium
    Posts
    165

    Default

    I suggest you read about originating domain and Ext.data.ScriptTagProxy
    Ext.data.ScriptTagProxy - An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain other than the originating domain of the running page.
    Example is here.
    ExtJS 3.4, WAMP Apache 2.2.17, PHP 5.3.5, MySQL 5.5.8

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Location
    Italy
    Posts
    78

    Default

    so, the autoload is not good?

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Location
    Italy
    Posts
    78

    Default

    so, I have to use a store. And I can't attach a store to a panel. Should I use a gridpanel??

  5. #5
    Sencha User walldorff's Avatar
    Join Date
    Mar 2008
    Location
    Antwerp, Belgium
    Posts
    165

    Default

    Well, the Paging Grid Example does contain a grid, isn't it?
    So go from there. There's so much to learn, look for examples from Saki, Jay Garcia and many others. Also Condor has a huge amount of posts you can learn from.
    ExtJS 3.4, WAMP Apache 2.2.17, PHP 5.3.5, MySQL 5.5.8

Similar Threads

  1. Loading External HTML into panel
    By otaviors in forum Ext GWT: Help & Discussion (1.x)
    Replies: 7
    Last Post: 12 Apr 2013, 3:21 AM
  2. Loading external url in panel?
    By jacstofberg in forum Sencha Touch 1.x: Discussion
    Replies: 34
    Last Post: 10 Aug 2012, 3:49 AM
  3. Loading website in panel
    By vasu6811 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 10 Jun 2009, 8:13 AM
  4. Hyperlink in Grid cell to external website
    By TriangleIL in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 Jan 2009, 2:54 AM
  5. Loading an external page into a panel
    By gpstatnon in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 4 Sep 2008, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •