Forum Moderators: open
<script language="text/javascript">
if (navigator.userAgent.toLowerCase().indexOf('msie')!=-1) {
alert('INTERNET EXPLORER');
} else if (navigator.userAgent.toLowerCase().indexOf('firefox')!=-1) {
alert('FIREFOX');
} else if (navigator.userAgent.toLowerCase().indexOf('safari')!=-1) {
if (navigator.userAgent.toLowerCase().indexOf('chrome')!=-1) {
alert('CHROME');
} else {
alert('SAFARI');
}
}
</script>
It's supposed to detect what browser you're using, then return an alert based on that.
The problem is... it doesn't do anything. When you load the page, it's just blank.
I've tried putting it in the head section, body section, loading it from an external .js file... everything.
Thanks in advance!