Results 1 to 3 of 3

Thread: InvalidCharacterError: Failed to execute 'setAttribute' on 'Element'

  1. #1
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default Answered: InvalidCharacterError: Failed to execute 'setAttribute' on 'Element'

    I have a grid, whose model has a field of type String.

    The value being set has special character, something like this - ' Adding a white" character '

    Please note the (") character after (white). This is causing an exception, if i do any king of data manipulation on that record. May it be any field in that record.

    Below is the stack trace.

    Code:
    Table.js?_dc=1472219652377:2649 
    Uncaught InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': 'white"' is not a valid attribute name.
    updateColumns                    @ Table.js?_dc=1472219652377:2649
    handleUpdate                         @ Table.js?_dc=1472219652377:2461
    onUpdate                         @ AbstractView.js?_dc=1472219652391:1228
    fire                             @ Event.js?_dc=1472219652373:415d
    oFireEvent                     @ Observable.js?_dc=1472219652367:782
    prototype.doFireEvent             @ EventDomain.js?_dc=1472219652374:292
    fireEventArgs                     @ Observable.js?_dc=1472219652367:621
    fireEvent                         @ Observable.js?_dc=1472219652367:574
    onCollectionItemChange             @ Store.js?_dc=1472219652364:568
    notify                         @ Collection.js?_dc=1472219652374:3047
    itemChanged                     @ Collection.js?_dc=1472219652374:1777
    afterChange                     @ Store.js?_dc=1472219652364:577
    afterEdit                         @ Store.js?_dc=1472219652364:586
    callJoined                         @ Model.js?_dc=1472219652368:2711
    set                             @ Model.js?_dc=1472219652368:1247
    onEditComplete                 @ CellEditing.js?_dc=1472219652370:594
    onEditComplete                 @ CellEditor.js?_dc=1472219652377:148
    I am unable to figure out what is causing this.

    Any help is appreciated.

    Thanks

  2. Actually, adding this render config in the column simply solved my problem.


    renderer: Ext.util.Format.htmlEncode

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Can you HTML-encode the double-quote character?
    Code:
    &quot

  4. #3
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default

    Actually, adding this render config in the column simply solved my problem.


    renderer: Ext.util.Format.htmlEncode

Similar Threads

  1. Replies: 3
    Last Post: 8 Feb 2015, 4:24 PM
  2. Replies: 2
    Last Post: 25 Feb 2014, 6:54 PM
  3. [2.2] Ext.Element setAttribute (and ability to update qtip on the fly)
    By JamesC in forum Ext 2.x: User Extensions and Plugins
    Replies: 2
    Last Post: 14 Feb 2010, 4:24 AM
  4. [solved]Element.update() , script element not execute
    By azheng in forum Ext 2.x: Help & Discussion
    Replies: 12
    Last Post: 12 Apr 2009, 4:41 AM

Tags for this Thread

Posting Permissions

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