views:

2120

answers:

2

hi,

i am using latest version of jquery autocompletion plugin. and have populated an array(input for autocomplete) abt 800 entries.

now strangely when i type a letter which triggers large results(causing a scroll bar), i can see a scrollbar in mozilla but not in Internet explorer.

i have only included

jquery.autocomplete.css

and

jquery.autocomplete.js

files in my jsp.

should i need to include anything else, what might have went wrong with me?

any help?

thank you.

__EDIT________________

CSS looks like this :

.ac_results { padding: 0px; border: 1px solid black; background-color: white; overflow: hidden; z-index: 99999; }

.ac_results ul { width: 100%; list-style-position: outside; list-style: none; padding: 0; margin: 0; }

.ac_results li { margin: 0px; padding: 2px 5px; cursor: default; display: block; /* if width will be 100% horizontal scrollbar will apear when scroll mode will be used / /width: 100%;/ font: menu; font-size: 12px; / it is very important, if line-height not setted or setted in relative units scroll will be broken in firefox */ line-height: 16px; overflow: hidden; }

+1  A: 

Changing dtd solved the problem for me:

See this for more info: http://old.nabble.com/-autocomplete--Problem-with-Scrolling-IE-7-td20758062s27240.html

/Olle

Olle H
+1  A: 

Adding this additional check for document.body.style.maxHeight in the jquery.autocomplete.js fixed the issue for me:

                if($.browser.msie && 
                    ((typeof document.body.style.maxHeight === "undefined") ||
                    (document.body.style.maxHeight == '')))

It is around line 735

guntars
By the way, the issue does not appear if you set a proper doctype (so that IE does not enter quirks mode): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
guntars