On Mar 20, 3:04 pm, Mike Alsup <mal...@gmail.com> wrote: > > I'm seeing the same issue with IE8 and setExpression. From > > MSDN:http://msdn.microsoft.com/en-us/library/ms537634.aspx > > Can you try v2.16? > > http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.16
Hey Mike, I'm using 2.16 and I've run into an issue with IE6 and the same block of code that is shown in this thread ( s.setExpression(...) ) when I use the following in a page: var My_jQuery = jQuery.noConflict(true); I then pass in My_jQuery into the BlockUI plugin instead of jQuery. The issue is that "jQuery.boxModel" in the setExpression code causes an error in IE6 stating jQuery.boxModel is null or not an object, and I'm asked to debug, and if I click No, I keep getting the error, probably due to the "live" nature of the expression for width and height I then have to force quit IE6. Note: In case it matters at all, I have IE7 on my WinXP Pro system and I'm using IE6 via MultipleIEs ( http://tredosoft.com/Multiple_IE ). My reading up on jQuery.noConflict(true) indicates that the jQuery object is removed if there is no other version of jQuery attached to the page (which is the case in my demo page, but may not be so "in the wild"), and in quick testing alerting jQuery after the jQuery.noConfilcit(true) line indeed shows that jQuery is undefined. So I found that if I replaced the jQuery.boxModel with My_jQuery.boxModel it worked, but I feel that that's not best solution, but if I pulled the jQuery.boxModel out of the string like so: old (line 227): full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel? 0:'+opts.quirksmodeOffsetHack+') + "px"') new: full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - ('+ ($.boxModel? 0:opts.quirksmodeOffsetHack) +') + "px"') old (line 229): full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') new: full ? s.setExpression('width', ($.boxModel?'true':'false')+' && document.documentElement.clientWidth || document.body.clientWidth + "px"') That seemed to work out for me, the error/crash went away and when invoked the UI is blocked appropriately, but as I've not studied the BlockUI plugin code much, I'm not sure if that will introduce any other issues down the road, as I'm not sure if the value of jQuery.boxModel will need to be specifically checked at run time of the expression and not just when the expression is set in this code. If I'm missing something that would make IE6 play better with BlockUI and jQuery in noConflict mode, or if I'm introducing other issues by making these changes, really I'd appreciate hearing about it. Danilo Celic