Hybrid View

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    jop_008 is on a distinguished road

      0  

    Default Src.sencha.io usage

    Src.sencha.io usage


    Hi,

    I try to scale my images in a carousel with the src.sencha.io option

    I use this html: '<p><img src="http://src.sencha.io/http://localhost:8080/webapp_ios/mvillacomfort/resources/imgs/terras avondsfeer.jpg"></p>',
    this results in a 404 error message. The path of the image is fine.
    Is there a way to use relative paths with src.sencha.io?

    John

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    The Netherlands
    Posts
    75
    Vote Rating
    4
    SebasSP is on a distinguished road

      0  

    Default


    The Sencha IO Src server needs to retreive your image in order to be able to resize it. Since your image is on your localhost it will not be able to get it. Try accessing the image from your public ip (with the right port forwarding) or put it on a live server.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    jop_008 is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thanks I am gonna change this. I guess relative paths are not possible.

    John

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    jop_008 is on a distinguished road

      0  

    Default Place of the pictures changed

    Place of the pictures changed


    Hi,

    I changed the code to this:

    html: '<p><img src="http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/terras avondsfeer.jpg"></p>',
    },{
    html: '<p><img src="http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/trapmuurtje.jpg"></p>',

    but this was without success no pictures in the carousel.

    John

  5. #5
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Those urls work for me when I open them inside the browser - try this instead:

    Code:
    Ext.create('Ext.Carousel', {
        items: [
            {
                xtype: 'img',
                url: 'http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/terras avondsfeer.jpg'
            },
            {
                xtype: 'img',
                url: 'http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/trapmuurtje.jpg'
            }
        ]
    });
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    jop_008 is on a distinguished road

      0  

    Default Carousel in tabpanel

    Carousel in tabpanel


    Hi,

    Thanks for your feedback.
    My code has to run form a tabpanel so one of the items of Ext.tab.panel is this

    {
    title: 'Foto\'s',
    iconCls: 'bookmarks',
    xtype: 'carouselLB'
    }

    and 'carouselLB' is this

    Ext.define( 'Myapp.view.Carousel', {
    extend: 'Ext.Carousel',
    xtype:'carouselLB',
    items: [
    {
    xtype: 'img',
    url: 'http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/terras avondsfeer.jpg'
    },
    {
    xtype: 'img',
    url: 'http://src.sencha.io/http://jophosting.x10.mx/mvillacomfort/resources/imgs/trapmuurtje.jpg'
    }
    ]
    });

    Now I have a blank page without error messages. You can see the site here:
    http://jophosting.x10.mx/mvillacomfort/

    John

Thread Participants: 2

Tags for this Thread