Hi there
I’m not much of a developer I know a bit of everything, html, css, php, mysql not much js though. Well I managed to find a
js menu for a site I’m developing works well. However the position of the menu differs in IE and Firefox. So I’ve made
two seperate .js files and tried to create a script to detect what browser the user is using and then load the
appropriate .js file sounds simple I’m sure it is, but I just can’t get it to work.
Here is my code
<script type=“text/javascript”>
var browserName=navigator.appName;
alert (browserName)
if (browserName==“Netscape”)
{
function Go(){return}</script>
<script type=“text/javascript” src=“cat.js”></script>
<script type=“text/javascript” src=“menu9_com.js”>
}
else (browserName==“Microsoft Internet Explorer”)
{
function Go(){return}</script>
<script type=“text/javascript” src=“cat-ie.js”></script>
<script type=“text/javascript” src=“menu9_com.js”>
}
}
</script>
What am I doing wrong ?
Thanks in advance for your help
Dan