Skip to main content

Bug Tracker

Side navigation

#5136 closed bug (invalid)

Opened August 28, 2009 04:11PM UTC

Closed October 02, 2009 01:32AM UTC

change type of input field

Reported by: Sn3b Owned by:
Priority: minor Milestone: 1.4
Component: core Version: 1.3.2
Keywords: input type password Cc:
Blocked by: Blocking:

Hi, I tried to change the input type of a field from password to text. I saw many articles online actually remove the field and recreate it on the fly to accomplish that, which I don't understand...

Anyway, I thought a simple $("#field").attr("type", "text/password") would do, but it simply doesn't work where document.getElementById("field").type="text/password" works just fine.

Not sure if it's a bug, as I said most articles (and even my router's embedded website does the same for hiding/showing wifi key) remove the element and recreate it programmatically.

Attachments (0)
Change History (1)

Changed October 02, 2009 01:32AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

The behavior varies from browser to browser; I know IE won't let you change the type after it's been created so the only cross-browser way is to create a new element.