PDA

View Full Version : ieDeferSrc and SSL_SECURE_URL problem



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

jack.slocum
12 Jan 2007, 5:41 AM
That's great Robert. Any chance you would like an ID to add this to the FAQ? :D

If not I can paste it in.

rgraff
12 Jan 2007, 8:28 AM
I will do that.

jack.slocum
12 Jan 2007, 12:14 PM
I've added you. Thank you.

brondsem
24 Jan 2007, 6:08 AM
First, can this documentation be added to the YAHOO.ext.EventManager documentation? That's where most people will look first when they have problems with EventManager.onDocumentReady.

Second, I can't find the "FAQ" anywhere anyway.

Thanks

tryanDLS
24 Jan 2007, 7:19 AM
See this - it's not widely publicized, because there isn't a whole lot there yet.
http://yui-ext.com/manual/contents

lgerndt
18 Apr 2007, 9:14 PM
Dear Robert,

Thank you so much for posting you solution, which worked when the others didn't. I've been working on this bug for so long it started to become, as my colleague said, 'my precious'.:> thanks again!