Andrew Poulos wrote:
How can I detect whether VML is supported?
IE 5.5 or higher is the only one with VML support, so that's easy:
<script type="text/javascript">
/*@cc_on @*/
/*@if (@_jscript_version >= 5.5)
var isVML = true
@else @*/
var isVML = false
/*@end @*/
// rest of your code
</script>
This way for IE5.5isVML will be true, for all other UA's isVML will
be false.
Please not though that IE will not recognize VML tags until you add the
needed namespace to your HTML document. See more at
<http://msdn.microsoft.com/workshop/author/vml/SHAPE/e_shape.asp>