PDA

View Full Version : Resolved is it possible to prevent auto suggestions when entering data on my site?


LJackson
10-26-2009, 09:57 PM
Hi All,

ok i have an auto suggest text box on my site which suggests results to the user, however if the user searches for something that is similar to what the have already searched for you get the standard form suggestions which remembers what you have searched for in the past, is there a way to turn this off on my site only?

thanks
Luke

_Aerospace_Eng_
10-27-2009, 01:31 AM
Add autocomplete="off" to the form. Note that this is proprietary and it isn't technically valid but many browsers have adopted it. If you want to keep your code valid then you will have to use javascript to set the attribute using the following.
<script type="text/javascript">
window.onload = function()
{
document.getElementById('yourformid').setAttribute('autocomplete','off');
}
</script>

LJackson
10-27-2009, 12:46 PM
thanks mate :)