Results 1 to 2 of 2
hi,
i would like some assistance with the following script at this link. Dynamic Drive DHTML Scripts- Browser Sniffer Script . i would like to have the script checking the ...
- 06-24-2009 #1Linux Newbie
- Join Date
- Dec 2006
- Posts
- 119
[SOLVED] Javascript - Web browser checker
hi,
i would like some assistance with the following script at this link.Dynamic Drive DHTML Scripts- Browser Sniffer Script. i would like to have the script checking the web browser version on IE5 and IE6 and reject them or giving them a pop-up message saying that they need to upgrade their web browser.
i have tried everything on the documentation but it doesn't seem to work.
thanks in advance.
- 06-24-2009 #2Linux Newbie
- Join Date
- Dec 2006
- Posts
- 119
never mind.... i was able to fix it with this script that i found that does exacly what i want to do.
from Tryit Editor v1.4Code:<html> <head> <script type="text/javascript"> function detectBrowser() { var browser=navigator.appName; var b_version=navigator.appVersion; var version=parseFloat(b_version); if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=4)) { alert("Your browser is good enough!"); } else { alert("It's time to upgrade your browser!"); } } </script> </head> <body onload="detectBrowser()"> </body> </html>


