Jump to content

Recommended Posts

Thanks for the reply,,, the reason I couldn't get it to work is that apparently Google Chrome is ignoring 

.autocomplete = 'off'

That code should work in other browsers.

 

A workaround that works, but affects performance, is to create an empty table to use as an AutoComplete lookup table.

Link to comment
Share on other sites

  • 3 years later...

@ezIQchad

 

autocomplete=”off” is not valid markup with XHTML Transitional, which is a common DOCTYPE.

I always have this code in web programming and it is working until now, you may try this and it might help.

 

if (document.getElementsByTagName) {

var inputElements = document.getElementsByTagName(“input”);

for (i=0; inputElements; i++) {

if (inputElements.className && (inputElements.className.indexOf(“disableAutoComplete”) != -1)) {

inputElements.setAttribute(“autocomplete”,”off”);

}

}

}

Link to comment
Share on other sites

  • 2 years later...

/* Turn autocomplete off  on form*/ 
document.getElementById("caspioform").setAttribute("autocomplete", "off"); 

 

/* Turn autocomplete off  on each input text element*/ 
if (document.getElementsByTagName("input").length > 0) {
  var inputElements = document.getElementsByTagName("input");
  for (i=0; i < inputElements.length ; i++) {
    if (inputElements[i].getAttribute("type") == "text") {
      var att = document.createAttribute("autocomplete");
      att.value = "off";
      inputElements[i].setAttributeNode(att); 

    }
  }
}

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...