Ajax, autocomplete and JavaScript (or CSS)

IE has the annoying issue with autocomplete text boxes where if you select an item from the autocomplete list the onchange event is not fired. Does Firefox have the same "feature"? Turning off autocomplete for specific forms or textboxes would be a simple task, but I am using Struts tags which do not support this.

I would rather not screw around with subclassing the Struts html:text tag and changing pages over to use the subclassed tag. The thought occurred to me that I could turn off autocomplete via JavaScript or CSS. I don't know jack about CSS and I only know a little more that that about JavaScript and manipulating DOM objects. I tried a few things and the following seemed to work:

Some limited tested showed that this worked for IE 6, but did not do anything for Firefox. (I technically only have to support IE, but I would rather have a cross browser solution). Does anybody have an elegant way of turning off autocomplete via JavaScript or CSS?

BTW, the purpose of this post was not how to deal with the Ajax/autocomplete/onchange issue, but if somebody can point me to an elegant solution or provide information on the typical way of dealing with this I would love to hear it.

Eric: Thanks for the reply. I am not sure I want to switch over to onblur. It seems like as it is I will be making quite a few Ajax calls when somebody is filling out a form. I am not sure I would want to make Ajax calls when the user it tabbing through the form and not changing values. I am pretty new to Ajax, but I thought that onchange was the most common event to use. Am I wrong?

I just hooked up the call to setAttribute and it is working in IE and Firefox. That seems good enough to me so I will go with that solution. I am almost positive that the security policy in place by my client requires that users turn off autocomplete in their browser settings so it is probably not a huge deal in any case.