1. #1
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    227
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default image src vs cls

    image src vs cls


    I need to set the image source via css and not using a static path in "src" property.
    In Architect the "src" property is mandatory, if i try to set only "cls" I have an error..

    How can I do it?

    Thanks.

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Posts
    206
    Vote Rating
    8
    allisterf is on a distinguished road

      0  

    Default


    Did you add the css file that references your class as a resource in Architect?
    Allister

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,105
    Vote Rating
    114
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by nicolabaldo View Post
    I need to set the image source via css and not using a static path in "src" property.
    In Architect the "src" property is mandatory, if i try to set only "cls" I have an error..

    How can I do it?

    Thanks.
    Although Architect shows you an error in the inspector your project should still save/export without problem.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    227
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default


    I resolved... in the afterrender of the image I used:
    myImage.setSrc(Ext.BLANK_IMAGE_URL) and it works!

Thread Participants: 2