};
function initSuggestions () {
- var inputs = document.getElementsByTagName("input");
+ var inputs = document.getElementsByTagName ("input");
+ if (inputs.length == 0)
+ return false;
for (i=0;i<inputs.length;i++)
{
if (inputs[i].type == "text" && autocomplete != "off")
var smth = new AutoSuggestControl (inputs[i], new FormSuggestions (ename));
}
+ return true;
};
"function () {"
" if (document.getElementById('formhistory'))"
" return;"
- " initSuggestions ();"
+ " if (!initSuggestions ())"
+ " return;"
" var mystyle = document.createElement('style');"
" mystyle.setAttribute('type', 'text/css');"
" mystyle.setAttribute('id', 'formhistory');"