PDA

View Full Version : Breaking on JSciprt runtime error in IE but working in Chrome



mukeshgla
5 Jul 2013, 1:18 PM
Hi I ma getting Breaking on JSciprt runtime error error only for IE while the same piece of code work well in Chrome.


I try to set and html syntax to outerHTML element, it works fine in chrome though.

Ext.get('myelement').dom.outerHTML ="<td width= '10%' id ='mybutton' class='Copy' style = 'font-weight:bold;color:#ffffff' >Hello</td>" ;


Thanks & Regards
Mukesh Pandey

slemmon
8 Jul 2013, 1:08 PM
I'm not seeing the error when I test, but using your script there you're retrieving the element with ExtJS, but then just accessing the dom and interacting with it directly - so at that point not really an ExtJS distinction.

What are you trying to do?

mukeshgla
16 Jul 2013, 9:35 AM
I am trying to change the text and its properties in dom element...its works fine for chrome and IE-10 but fail for IE-8. It shows run time error like JS Run time error...is there any alternative to change the text and its corresponding properties in dom ?

slemmon
16 Jul 2013, 9:30 PM
If you're working with an Ext component you can likely use update()
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Panel-method-update

If you're working with an element you can use the Ext.dom.Element.update() method:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.dom.Element



Ext.fly('myelement').update('HTML used to update myelement');