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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.