My site breaks in IE6 but works well with IE7. I need a javascript that will check if any visitor is using IE6 then display a message. I'm a completely noob in programming so please don't refer me to site that teach you to do it. I need a ready made script. The script will be uploaded to the server and a code between <script> tags will be placed on the page. I plan to put the message in a widget that will displayed at the top of the article. The widget should run only when the browser is IE6. Please help me.
Try this <script type="text/javascript"> if (document.all && !window.opera) { // IE browser if (window.XMLHttpRequest) { alert('IE7'); } else { alert('IE6 or lower'); } } </script>
Why don't you use one that doesn't use javascript at all? <!--[if IE 6]> Put the message for IE6 users here <![endif]-->
@dancom96: I want the message to be seen only by ie6 users. How to do that without javascript? I want the code. Sorry, for beign so dumb.