Pages

26 June 2009

Lookup fields in MOSS and the MS IE Javascript error

If the lookup list has more then 20 items(see the reflector code) and you happen to use Internet Explorer to edit a list item having a filed of type lookup, then you might have some problems.
There will be a javascript error and no way for you to pick the value that you want, because MOSS decides to help you by adding a input text field used for looking up your value as you type and emulates an select box picker, by positioning a layer containing filtered values.

The positioning fails because the the input text box is nested in a table and the offsetParent/offsetLeft/offsetTop are failing (known IE bug).

So in the core.js there are two functions AbsLeft and AbsTop which you'll have to override in order to get an aproximate positioning.


No comments:

Post a Comment