[Prototype-core] writeAttribute and IE7

2008-06-23 Thread [EMAIL PROTECTED]
So, I have a problem while using writeAttribute for changing the type of an input field. Here is my code: $(id).writeAttribute({type: 'password'}); or $(id).writeAttribute('type', 'password'); Works fine with FF but IE7 tells that this command won´t be supported. Does anyone knows something

[Prototype-core] Re: writeAttribute and IE7

2008-06-23 Thread artemy tregoubenko
Afaik, IE won't let you change type of an input after input is created. You need to create input with correct type. This can be done like this: var a = new Element('input', {type: 'password'}) On Mon, 23 Jun 2008 14:28:55 +0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, I have a p

[Prototype-core] Element.writeAttribute and FF

2008-06-23 Thread Josi
Hi, After one hour of debugging, I found out that Element.writeAttribute could throw an Exception "0x80530005 (NS_ERROR_DOM_INVALID_CHARACTER_ERR)" on Line 1808 element.setAttribute(name, value) I created an Element by using this: var elem = new Element('div', {'class':'myclass','id':'myid'}).up

[Prototype-core] Re: Element.writeAttribute and FF

2008-06-23 Thread kangax
#writeAttribute will fail when given bogus attribute/value. That's one of the reasons why passing Element as an iterator doesn't work. // Element receives 0,1, ..., n as a second attribute (and then tries to apply those values via #writeAttribute) $w(' div span h2 ').map(Element); - kangax On J