HZNM.COM
welcome to my space
X
Search:  
 HOME   FormPanel > Panel > IMG, ie7 error
FormPanel > Panel > IMG, ie7 error
Published by: rose 2010-03-18
Welcome to:hznm.com

  • Hello ExtJSers!

    I've created a FormPanel and needed to embedd an IMG element in it (upload image preview).
    So I did it like this:

    var img_preview = document.createElement('img')
    img_preview.width = 156
    img_preview.width = 118
    img_preview.src = 'http://www.tapuz.co.il/HP/images/wakingup.jpg'

    var img_panel = new Ext.Panel({
    items:[new Ext.Element(img_preview)]
    })

    and put 'img_panel' in Ext.FormPanel's [items].
    It works in firefox but gives me the following error in explorer 7:
    [new version] DateTime Field - Page 29 - Ext JS Forums::
    [new version] DateTime Field Ext 2.x: User Extensions and Plugins Iam getting error on IE7. Hi, Kindly see the attached datetimeerror.jpg. This is the code
    http://www.extjs.com/forum/showthread.php?p=222324
    HOME

    Line: 15658
    Error: Unexpected call to method or property access.

    on this line:

    this[name] = Ext.get(pnode.appendChild(el));

    from
    createElement : function(name, pnode){
    [name == 'bwrap']
    from
    Ext.Panel = Ext.extend(Ext.Container, {

    So, is this the right way to embedd an image in a FormPanel? What am I missing?
    Thanks,
    michael


  • Thanks Condor,
    this help me ;-)


  • thanks Condor!!


  • Use:

    var img_panel = new Ext.Panel({
    items:[{
    xtype: 'box',
    autoEl: {tag: 'img', height: 118, width: 156, src: 'http://www.tapuz.co.il/HP/images/wakingup.jpg'}
    }]
    })


  • You can't add an Element to an Ext.Container (e.g. Ext.Window). You can only add Ext.Components.

    Use:

    this._window = new Ext.Window({
    layout:'fit',
    width:400,
    height:200,
    closeAction:'hide',
    plain: true
    });
    var img = new Ext.BoxComponent({
    autoEl: {tag: 'img', src: Ext.BLANK_IMAGE_URL},
    listeners: {
    render: function(c) {
    c.getEl().on('load', this.MyMethod, this);
    },
    scope: this
    }
    });
    this._window.add(img);
    ....
    img.getEl().dom.src = myvar;


  • Hi Condor,
    I have similar problem, but I need to assign the image element to a variable so that I can change the image source later. My code now, is like the following:

    this._window = new Ext.Window({
    layout:'fit',
    width:400,
    height:200,
    closeAction:'hide',
    plain: true
    });
    var Img = new Ext.Element(document.createElement('img'));
    this._window.add(Img);
    Img.on('load',this.MyMethod,this);

    ....
    Img.src = myvar;

    But when I add the Img element I get same posted error (in IE7).

    Some suggestion?





  • Challenging Books For A 14 Year Old?
    First guitar : acoustic or electric?

    You are looking at:hznm.com's FormPanel > Panel > IMG, ie7 error, click hznm.com to home
  • is there any way to get rid of a cough
  • play even higher notes and playing them clean on mellophone
  • audition help please help emergency
  • what are good music schools for singers
  • please edit my conclusion paragraph
  • ideas for a speech monologue
  • how do you stop your hands from sweating before an exam
  • should i learn cello
  • is saint saens le carnaval des animaux aquarium difficult to play on the piano
  • epiphone acoustic ej strings
  • can i learn oboe without a private instructor
  • for 3 days grace fans and guitarists
  • rent to own tenor sax
  •  
  • best brand of clarinet reeds
  • are we all totally unique or totally the same
  • do guitar begginers need to have a starter pack
  • what bass drum pedals can you recommend for rush dream theater and fusion type drumming
  • is it normal to be only on level 4 or 3 in piano and you are 13 years old
  • magic performance background music needed
  • where can i get good online piano lessons free
  • i 039 m applying to juilliard what do you think of this repertoire
  • how do i get noticed by college bands
  • do you think i can get famous by making beats in fl studio
  • shakespeare soliloquy need help please
  • m r s a in a 6 week old baby
  • how do i contact a producer
  • a request for singers that wouldn 039 t mind doing a dub for me just partily
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 hznm.com        Site made:CFZ