close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Question about jquery-blockui-formprocessing.js

Thread began 6/06/2009 2:25 am by I-CRE8 | Last modified 6/10/2009 8:05 am by I-CRE8 | 3383 views | 3 replies

Danilo Celic

I think what you question is really driving at is should you be making the same changes that we did. The short answer is probably not. The long answer follows...

We actually didn't delete the lines mentioned, we changed the code slightly to make the DFP use of the BlockUI plugin work in IE6.

The specific issue is that jQuery can be set to be used in a no conflict mode, and the BlockUI plugin was not written in a manner that seemlessly allowed for no conflict mode. No Conflict mode allows the jQuery library to be used with different versions on the same page. As we couldn't be absolutely certain that a page will have jQuery on the page, much less a specific version of jQuery on the page, a copy of jQuery library is linked to the page and jQuery.noConflict() is used. We assign the jQuery object returned from noConflict to a variable (named WADFP_jQuery) and we then use that variable as the jQuery object instead.

The lines in question are:

full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')



and:

full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')



And we changed them to:

full?s.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - ("+($.boxModel?0:opts.quirksmodeOffsetHack)+')+"px"')



and:

full?s.setExpression("width",($.boxModel?'true':'false')+' && document.documentElement.clientWidth || document.body.clientWidth + "px"')



setExpression evaluates an expression at runtime, and with the jQuery.boxModel value directly within the string that is to be evaluated, that caused an error as the jQuery object didn't exist at run time as it had been "renamed" to WADFP_jQuery due to the use of noConflict. This issue only showed up for me when using IE6 in testing. The changes apply the appropriate values into the string that is to be evaluated without referencing the jQuery name. We needed to do this, because in noConflict mode, the jQuery object named "jQuery" doesn't exist in the global scope when this code is executed.

If you're using jQuery and the BlockUI plugin and you are not using noConflict to create your own version of jQuery for compatibility purposes, then you do not need to worry about integrating these changes into your own code.

FWIW: I reported this issue on the jQuery Google Group which is used for support for this plugin, but I don't know if this workaround will be integrated into a new version of BlockUI.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...