Thursday, 15 August 2013

html - Javascript not working on specific versions of IE -



html - Javascript not working on specific versions of IE -

i've rare issue ie. i'm trying create page launches script when ie version lower or equal ie 8 (just simple alert , location). when seek debug html on ietester alert shows on ie 5.5 , ie 6 neither in 7 nor 8. doing wrong?

<!doctype html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <!--[if lte ie 8]> <script type="text/javascript"> alert('para poder usar consumedia necesita tener instalada una version de net explorer 9 o superior'); window.location = "http://www.google.com"; </script> <![endif]--> </head> <body> </body> </html>

this showing me alert native ie7.

it seems ietester might have bug regarding conditional comments. see how create ie9 emulate ie7? alternative ietester.

@pekka has commented on matter couple of times:

when multiple instances of net explorer installed (or active) on same system, conditional comments resolved against highest ie version available on system

edit: doesn't add together much, i've got ie7 installed, , shows alert ietester ie <= 7.

javascript html internet-explorer alert ietester

No comments:

Post a Comment