Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Detect IE6 not working
Old 04-14-2010, 12:29 PM Detect IE6 not working
Novice Talker

Posts: 8
Trades: 0
Hi,

I have the code below, however it doesn't seem to work - does anyone know what the problem is?

I dont want to display any image if the browser is IE6

Thanks

Code:
<!--[if !(IE 6)]>

                        <script type="text/javascript">
                        if (document.documentElement.clientWidth <= 1200) {
                            document.write('<img src="images/home-heading-image-small.png" title="title" alt="alt" />');
                        }
                        else {
                            document.write('<img src="images/home-heading-image.png" title="title" alt="alt" />');
                        }
                        </script>
                        
                        <![endif]-->
ChilliLime is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-20-2010, 03:14 PM Re: Detect IE6 not working
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Why are you going that far with a detection script? A conditional comment will be read ONLY by IE6 and you can then use CSS to limit what gets displayed to IE6 users. You're complicating things more than they need to be
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Detect IE6 not working
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18786 seconds with 12 queries