This project is archived and is in readonly mode.

#677 ✓invalid
Aicke Schulz

IE6: set('text', '...') results in an js error in setProperty

Reported by Aicke Schulz | May 27th, 2009 @ 02:08 PM | in 2.0 (closed)

MooTools Core 1.2.2, IE6, Companion.JS:

set('text', 'whatever') results in an javascript error in:

in line: (key) ? this[key] = value : this.setAttribute(attribute, '' + value);
of function: setProperty: function(attribute, value)

Comments and changes to this ticket

  • David Walsh

    David Walsh May 27th, 2009 @ 08:56 PM

    Aicke: Could you please provide an example? Unfortunately there isn't enough information here to work with.

  • Aicke Schulz

    Aicke Schulz May 28th, 2009 @ 10:45 AM

    as a test I executed only:

    window.addEvent('domready', function() {
    $$('a')[0].set('text', 'test'); $$('div')[0].set('text', 'test'); });

    this results in 2 syntax errors in the mentioned line above, with Companion.JS (a free javascript debug plugin for IE) in IE6 (the Xenocode version to get it running beside IE8). Can't check it with real IE6.

  • Scott Kyle

    Scott Kyle May 28th, 2009 @ 09:01 PM

    @Aicke

    I set up a very simple test page and couldn't reproduce your error.

  • David Walsh

    David Walsh May 28th, 2009 @ 10:37 PM

    • State changed from “new” to “invalid”

    I cannot duplicate the error either. I will close until a better example is given. This could be the result of a problem elsewhere.

  • Toto

    Toto August 21st, 2009 @ 01:45 PM

    I have the same problem using MooFlow on IE6 (under SharePoint). I believe it could be linked to the fact my page has no DocType, and hence works on quirks mode.

    Here's the line in MooFlow code that triggers the error :
    this.loader.set('text', (counter + 1) + ' / ' + this.loadedImages.length);

    Actually "this.loader.set('text', 'anything');" triggers the error too...

  • tvx

    tvx August 22nd, 2009 @ 07:00 PM

    I had this problem also, so I long time used Element.set('html',xxx) instead of Element.set('text', xxxx).
    I used IE6 and IE8 installed together.
    Problem now dissapeared after unistaling IE8 from computer.

  • pixelchutes

    pixelchutes October 26th, 2009 @ 06:24 PM

    I am using MooTools 1.2.3 and can also confirm this issue. (IE throws "Unknown Runtime Error")

    Appears to be isolated to IE6 and is failing on both set('text') and set('html').

    @tvx, I also have IE8 installed, but unfortunately cannot uninstall it to test if the problem also went away. However, I tested on a colleague's computer w/ Windows XP native IE6 (never had IE8 installed) and the problem persisted.

    NOTE: I am running IE6 via "Internet Explorer Collection" from: http://finalbuilds.edskes.net/iecollection.htm

  • pixelchutes

    pixelchutes October 26th, 2009 @ 06:58 PM

    • Tag changed from 1.2.2, element, ie6, set, setproperty to 1.2.2, 1.2.3, 1.2.4, element, ie6, set, setproperty
  • [rb]

    [rb] January 19th, 2010 @ 05:08 AM

    I found that both .set('text','whatever') or .set({text:'whatever'}) both cause the error in IE6 consistently.I had to go through all of the scripts I wrote for a client using set('html' instead and it worked fine after that.

    It's interesting that pixelchutes say's

    Appears to be isolated to IE6 and is failing on both set('text') and set('html'). for me using 'html' worked in IE6

    I should not that all the elements I was working with were created via new Element not accessed from the existing dom incase that makes a difference (you never know with IE)

    If its an unfixable issue for ie6 perhaps 'text' could be turned into an alias for 'html' in the set function if mootools has detected the browser to be IE6?

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages