Results 1 to 8 of 8

Thread: HTMLEditor issue when using form load

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    27
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: HTMLEditor issue when using form load

    Hi,

    I have a form with more than 2 htmleditor


    Code:
    ,{
    fieldLabel				:'Address',
    xtype					:'htmleditor',
    id						:'address',
    name					:'address',
    height					:90,
    allowBlank				:false
    },{
    fieldLabel				:'Contact',
    xtype					:'htmleditor',
    id						:'contact',
    name					:'contact',
    autoRender				:true,
    height					:90,
    allowBlank				:false
    }
    If I do not use form.load, both htmleditor are okay. However whenever I load the form using:


    Code:
    newjlform.load({
    			url: weburl+'joblogs/adddata/customerid/'+customerid+'/joblogtypeid/'+joblogtypeid,
    			failure: function(form, action) {
    				Ext.Msg.alert("Load failed", action.result.errorMessage);
    			}
    		});
    then the 2nd htmleditor froze, cannot see the content of it, cannot even type word inside it. the first htmleditor is okay.

    Is it a bug, or my code has error somewhere?

    Please help bro. Appreciate your help.

    Rgds,

  2. Oops, after wasting a lot of time to troubleshoot ... I finally found the culprit: xtype : 'container'. Really dun know why yet, but remove it solve the issue ...

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      0  

    Default

    What version of Ext JS 4 are you seeing this on and browser?

    I tried Chrome 18 (Lion) on Ext JS 4.1.0 RC1 with this code/JSON and didn't have any issue:

    Code:
    new Ext.form.Panel({
        renderTo : document.body,
        width    : 400,
        height   : 400,
        items    : [
            {
                xtype      : 'htmleditor',
                fieldLabel : 'Test',
                name       : 'address'
            },
            {
                xtype      : 'htmleditor',
                fieldLabel : 'Test',
                name       : 'contact'
            },
            {
                xtype   : 'button',
                text    : 'Load',
                handler : function(button) {
                    var form = button.up('form');
    
                    form.load({
                        url : 'data/json.json'
                    });
                }
            }
        ]
    });
    Code:
    {
        "success" : true,
        "data" : {
            "address" : "bam!",
            "contact" : "test"
        }
    }
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    27
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thx a lot Mitchellsimoens.

    So sorry that I forgot to mention the Extjs version and Browser version. Currently I use extjs 4.0.7, and Firefox v11

    You are right that when I use Chrome, it's okay.

    I found another strange thing is that: on the htmleditor that has issue, if I press Source Code button (and after that press again to back to normal mode), then that editor is back to normal, means can show content, can edit. That's a bit weird.

  5. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      0  

    Default

    Hmm... tried with 4.0.7 and 4.1.0 RC2 on Firefox 11 on Lion and am still not able to reproduce with my simple test.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  6. #5
    Sencha User
    Join Date
    Oct 2007
    Posts
    27
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Oops, after wasting a lot of time to troubleshoot ... I finally found the culprit: xtype : 'container'. Really dun know why yet, but remove it solve the issue ...

  7. #6
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      0  

    Default

    At least you figured it out!
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  8. #7
    Sencha User
    Join Date
    Oct 2007
    Posts
    27
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    At least you figured it out!
    Btw, Mitchellsimoens, thank you very much for your response . Should I call you Mitchell or Simoens? Really appreciate your help and fast response.

  9. #8
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      0  

    Default

    I get called by many names, some good some bad

    I prefer Mitchell and you're always welcome.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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