Page 1 of 1

Launch a popup window for IE6 only

Posted: Wed Nov 04, 2009 7:48 am
by davemwohio
My company is using Drupal for an internal site. Drupal need IE6 to display the nav menu properly but many users still have IE6. We want to launch a popup urging users to upgrade their browser if IE6 is detected. I am running the below script in a block that appears on the home page only but there are still a couple people with IE7 (one of whom is a vice president) who get the popup and I can't understand why. Any input appreciated.

Code: Select all

<?
 
$file = "http://webapps.corp.stercomm.com/salescenter/sites/default/files/upload/ie6warning.htm";
 
$pos = strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 6.0");
 
if ($pos === false)
{ 
}
else
{
 
?>
<script type="text/javascript">   
    function window.onload()   
    {   
        openpopup();   
    }   
    function openpopup()   
    {   
        winpops=window.open("<?=$file?>","","width=300,height=230");   
    }   
</script>   
<?
 
}
 
?>