I’m just trying to open a specific javascript file on a webpage depending on the browser. So far i have this code:
This works fine but instead of opening the javascript in the webpage it comes up with the download window for me to download the file to my PC.
I just want the file to run in the webpage, in the browser.
Any help will be appreciated.
Code:
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
open( "ff.js" );
}
else
{
open("ie.js");
}
</script>
This works fine but instead of opening the javascript in the webpage it comes up with the download window for me to download the file to my PC.
I just want the file to run in the webpage, in the browser.
Any help will be appreciated.