rgraff
11 Jan 2007, 4:14 PM
I'll describe my problem and solution in case some others are having the same problem with YAHOO.ext.EventManager.ieDeferSrc and YAHOO.ext.SSL_SECURE_URL.
In EventManger.js (0.40.0 and maybe earlier?) there's this line:
document.write('<s'+'cript id="ie-deferred-loader" defer="defer" src="' +
(YAHOO.ext.EventManager.ieDeferSrc || YAHOO.ext.SSL_SECURE_URL) + '"></s'+'cript>');
ieDeferSrc is by default undefined and YAHOO.ext.SSL_SECURE_URL is 'javascript:false;'.
IE, for me, doesn't see "javascript:false" as a secure url and gives a warning.
To avoid that warning, I set YAHOO.ext.SSL_SECURE_URL to the URL of clear pixel gif. If I don't also set YAHOO.ext.EventManager.ieDeferSrc to something else, IE tries to load and execute the gif as a script (Thanks, Microsoft!) which results in another error.
So either the documentation should warn about changing YAHOO.ext.SSL_SECURE_URL or ieDeferSrc should have it's own default. The later seems better to me.
After loading yui-ext-core, this is what I do to avoid all errors:
YAHOO.ext.EventManager.ieDeferSrc='/js/defer.js';
YAHOO.ext.SSL_SECURE_URL='/i/p/clear.gif';
YAHOO.ext.BLANK_IMAGE_URL='/i/p/clear.gif';
defer.js is a single line: 'false;'
-Robert
In EventManger.js (0.40.0 and maybe earlier?) there's this line:
document.write('<s'+'cript id="ie-deferred-loader" defer="defer" src="' +
(YAHOO.ext.EventManager.ieDeferSrc || YAHOO.ext.SSL_SECURE_URL) + '"></s'+'cript>');
ieDeferSrc is by default undefined and YAHOO.ext.SSL_SECURE_URL is 'javascript:false;'.
IE, for me, doesn't see "javascript:false" as a secure url and gives a warning.
To avoid that warning, I set YAHOO.ext.SSL_SECURE_URL to the URL of clear pixel gif. If I don't also set YAHOO.ext.EventManager.ieDeferSrc to something else, IE tries to load and execute the gif as a script (Thanks, Microsoft!) which results in another error.
So either the documentation should warn about changing YAHOO.ext.SSL_SECURE_URL or ieDeferSrc should have it's own default. The later seems better to me.
After loading yui-ext-core, this is what I do to avoid all errors:
YAHOO.ext.EventManager.ieDeferSrc='/js/defer.js';
YAHOO.ext.SSL_SECURE_URL='/i/p/clear.gif';
YAHOO.ext.BLANK_IMAGE_URL='/i/p/clear.gif';
defer.js is a single line: 'false;'
-Robert