Jump to content

[SOLVED] Change input element's Type...


Enormity

Recommended Posts

Hi, I am using the following code on my website (temporarily set up at partyparadiseohio.com) to change the input element's type for my password field, and to change the value to nothing.  (Right now, it says "Password" in the input box.)

 

	document.getElementById(obj).value = "";
document.getElementById(obj).type = "password";

 

This code works just fine on Firefox (of course), but does not change the element type on Internet Explorer.  Looking up other examples, they all show to do it like I have.  Can IE just not do this for some reason, or is there other code to do this on IE?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/167060-solved-change-input-elements-type/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.