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
else (browserName=="Microsoft Internet Explorer")
What am I doing wrong ?
Thanks in advance for your help
Script tags close a script-
You can't start a function in one script and continue with it after the script's end tag.
Hi dantheman187, welcome to the forums
You may have seen PHP code that goes "in and out" of HTML, but PHP is a server-side language and the resulting mark-up doesn't get output until the code has been interpreted.
Also I suggest you try to avoid relying on "browser detection" as it's highly unreliable. IMHO much better to do "compatability detection".