Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #13897

Re: Change type of <input>

From Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de>
Newsgroups comp.lang.javascript
Subject Re: Change type of <input>
Date 2012-05-13 12:44 +0200
Organization albasani.net
Message-ID <joo3b3$8b7$1@news.albasani.net> (permalink)
References <4faf80fe$0$6958$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


Tom de Neef schrieb:
> I try to change the type of an <input> element from 'text' to 'password'.
> No problem in FF an Chrome but IE8 will not allow it.
> Is that the end of the story, i.e. must I accept that I can not change from 
> 'text' to 'password'? Or is there an alternative approach?

You could create a new <input> element and set its type to 'password' -- 
IE allows this when no type has been set before. Then set all other 
attributes you need and replace the original element with the new one.

Greetings,
Thomas

-- 
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Change type of <input> "Tom de Neef" <tdeneef@qolor.nl> - 2012-05-13 11:38 +0200
  Re: Change type of <input> Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2012-05-13 12:44 +0200
  Re: Change type of <input> "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-05-13 13:55 +0300
    Re: Change type of <input> "Tom de Neef" <tdeneef@qolor.nl> - 2012-05-13 14:30 +0200

csiph-web