|
Posted by Anthony Levensalor on 01/10/08 06:47
* David Mark wrote
[snip]
>> function eventHandler(e) {
>> // in some browsers, e will be undefined, IE is one.
>> // in Mozilla, e will be an event object
>> if (window.event) {
>> e = window.event;
>> }
>>
>> var elm = e.srcElement; // IE
>> var elm = e.target; // Mozilla
>>
>> }
>
> e = e || window.event;
> var elm = e.target || e.srcElement;
>
Aye, that was not meant to be running code. That is precisely how I do
it in my apps. :)
>> There are countless other examples.
>> style.filter
>> style.opacity
>>
>> Both work with the alpha opacity of an element. In IE, however, you
>> cannot change the opacity of an element that does not have a width and
>> height explicitly set.
>
> Specifically, IE will not set the opacity unless the element sets its
> proprietary "hasLayout" property. Here is one way to force it:
>
> if (el.currentStyle && !el.currentStyle.hasLayout) { el.style.zoom =
> 1; }
>
Good tip, I was not aware of that. Danke.
[snip]
>> The following works in IE, FireFox, Opera, and Safari for Windows:
>>
>> <embed type="application/x-mplayer2"
>> src="11%20My%20Friend%20Of%20Misery.mp3" autostart="false" loop="false">
>>
>> With no modification. It isn't even valid markup, and it has that kind
>> of compatibility.
>
> I'll take your word for it, but standard nested objects can work just
> as well these days.
Whole post took about three minutes to write up, I was kinda just
showing him the door on this one. I did test the embed, and netscape 9
was the only one that wanted to download a plugin and couldn't find it.
The Object->Param->Embed construct that works even better and is much
more useful was just too long to type for my purposes here. :)
~A!
--
anthony at my pet programmer dot com
Navigation:
[Reply to this message]
|