Thomas said:
You should add the system identifier not to trigger Compatibility Mode.
And you can make that HTML 4.01 Strict, from what I can see and what the
W3C Validator tells me, that would be Valid, too.
I was not intending to make this a serious page since I do not use
Microsoft filters and such that most other browsers can not handle. I
usually use PaintShop to modify images. However, just for fun, I have
a new page at
http://www.cwdjr.info/test/rotateimages2.php . This has a
php include to serve the page as true xhtml 1.1 on browsers that can
handle the correct mime type application/xhtml+xml. Such browsers
include recent versions of Firefox, Mozilla, Netscape and Opera. For
browsers such as IE6 that can not handle this mime type, the server
rewrites the page as html 4.01 strict. Thus you will see either xhtml
1.1 or html 4.01 strict code when you view the source, depending on the
browser you are using. Both the xhtml 1.1 code and html 4.01 strict
code validate fully at the W3C html and CSS validators.
Yes, they are not shown in my Firefox 1.5 or Opera 8.5.
But it is probably not necessary and makes less sense to refer to the `div'
element. Filters can be applied directly to the `img' element. At least
that worked for me with IE 4.0 filters ever since; I do not use DirectX
filters for backwards compatibility.
If you apply the filter element to the image, it will rotate the image
only. If you apply the filters at a paragraph or division level, both
images and text in the division or paragraph will be rotated. There is
a comment about this in the new page source code.
Referring to the `img' element would also allow you to refrain from using
the IE-proprietary referencing and use document.images['myimg'] instead,
provided that you gave the `img' the name `myimg'.
I tried using document.images['myimg'] as you suggested. I left the
Microsoft conditional comments out for this test so the non-IE browsers
would see this code. The resulting code validates fully at the W3C and
there is no problem on non-IE browsers, although they of course do not
respond when the buttons concerning the filters are pressed. Everything
is at first well when you use the IE6(actually I use the SBC/Yahoo DSL
browser of my IP which takes over IE6 when you use their DSL service.
It is supposed to be about the same as IE6 in response to code).
However, when you click any of the buttons that calls the filters, you
get an IE popup saying that there is a script error for the code on the
line that generated the button, and that it does not understand the
object. Moreover, after a few more clicks, it turns script off, you can
not view the browser home page, and get a message that the page can not
be displayed because script is off. You have to reboot for things to
return to normal. Of course I could have made an error. However it
appears that the IE6-based browser wants Microsoftese code for the
buttons. I am using the Windows XP home OS with SP2 and all other
upgrades.
The page has some extra stuff to fill it out a bit and illustrate that
valid code can be written to work on most newer browsers for media such
as audio and flash. You do not have to resort to ActiveX or embed
codes. The page degrades well on most recent browsers if script is off,
if the WMP player is not installed, or if a flash player is not
installed. For example, if you use the W3C's Amaya browser with none of
these things installed, you just get a plain page with the image of the
bird. You would never know that flash, audio, or image rotation were
included, except for the 2 optional text messages on the page
concerning them or if you view the source code.
By the way, the image used for the flash was generated with javascript
in a polar coordinate system with color being a function of radius from
zero to the edge of the circle. Since this requires quite a bit of
calculation, the generated image was captured as a jpg to avoid long
recalculation every time it is used.
I seldom use flash, so I am using a free flash program That is the
reason for the 3-bar link near the top right of the page. If you pay
the company about US$ 30, you can get this link removed.