PDA

View Full Version : Writing text to the doc via ext does not work in firefox



mabra
14 Jul 2009, 12:35 PM
Hi !

May be someone can help with this? My code is as follows:


Ext.get("box1").dom.innerText = "Hallo!";
This just works in all browsers I've tested:IE6/7, Safari, Opera. It does not work in any FF variants [2/3].
How to write simple text to the document in Firefoxes?

Unexpectedly, using ".innerHTML" works even on FFxx.

Thanks so far.

br--mabra

Animal
14 Jul 2009, 12:39 PM
innerText is a Mc$oft invention.

As was innerHTML originally, but it has been accepted as a de-facto standard, so that's in fact not unexpected.

Anyway.

Was there a point?

mabra
14 Jul 2009, 2:56 PM
Hi !

Much thanks for the clarification, I have not known this.

But:How to put text [not html] into an element, hopefully working with each browser??

Thanks!

br--mabra

Animal
14 Jul 2009, 11:32 PM
What's wrong with using innerHTML?

mabra
15 Jul 2009, 9:13 AM
Hi !

Yes, why not?? /:) This may be, that I started once to learn html with the upcoming IE 4.01 und probably learned a lot, but also a lot of bullsh.....

Never came to the idea to write text using innerHTML .....I see my text now also in FF(xx) :)

Thanks a lot!

br--mabra

aconran
15 Jul 2009, 9:14 AM
There is also the update method exposed by Ext.Element which will update the innerHTML for you.

mabra
16 Jul 2009, 8:31 AM
Hi !

Thanks for the pointer, I'll try this too.

br--mabra