• 0

[javascript] doesn't work in firefox


Question

I whipped up a quick web page that has a link to my javascript. The js works fine in IE but 95% of firefox users report the script showing up as a text file instead of being executed. If you go to the page MySteamID.com and see the link under "Method 1" you can see what I mean. The code is freely downloadable in case ur suspicious, but all it does is read a value (a gaming ID) and display it for you.

On the server I defined the MIME type for js as:

application/x-javascript

application/javascript

and i even tried application/octet-stream

but its still not working for most firefox users. Any suggestions?

Link to comment
https://www.neowin.net/forum/topic/491255-javascript-doesnt-work-in-firefox/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

It shouldn't be executed (or if it is, Firefox should render errors). The reason why I say that is because it uses ActiveX. Unless Firefox users have the Mozilla ActiveX plugin installed, which most don't due to security concerns since they feel browsing with IE would be the same as browsing with Firefox with this installed, Firefox users won't be able to use that JS file.

  • 0

Are you thinking the js is run from the html page client side? it's not, it should be downloaded and executed by the OS via the Windows scripting host. The problem is getting firefox to let the OS execute it.

For example, in IE, when you click on the link it will ask you:

- do you want to save or open this file? say Open.

- the publisher could not be verified, run or don't? say Run.

then Windows script host provides a dialog box with the ID in it.

  • 0
  pgoudswa said:

Are you thinking the js is run from the html page client side? it's not, it should be downloaded and executed by the OS via the Windows scripting host. The problem is getting firefox to let the OS execute it.

For example, in IE, when you click on the link it will ask you:

- do you want to save or open this file? say Open.

- the publisher could not be verified, run or don't? say Run.

then Windows script host provides a dialog box with the ID in it.

It's a security hole, that's why it won't run. You'd have to have the user run it manually from the cmd prompt for FF, or make a shortcut that contains the command line for it.

I can't believe that IE 7 still gives you the option to run scripts like that. Usability should never trump security. Yay, MS! :rolleyes:

  • 0
  weenur said:

It's a security hole, that's why it won't run. You'd have to have the user run it manually from the cmd prompt for FF, or make a shortcut that contains the command line for it.

I can't believe that IE 7 still gives you the option to run scripts like that. Usability should never trump security. Yay, MS! :rolleyes:

Stupidity should never trump security, but alas that's a worse problem than insecure browsers. Thx for the suggestion tho, might make an exe but that would be more clicks! I've had 7 different people using FF 1.5.0.6 say it works for them, and a few others say it doesn't. Asking them if they're using the activex plugin. It does not work on my test system with a fresh FF/1.5.0.6. Personally I can't believe that FF doesn't give you the option to run scripts like that. :rolleyes: :)

  • 0
  pgoudswa said:

Stupidity should never trump security, but alas that's a worse problem than insecure browsers. Thx for the suggestion tho, might make an exe but that would be more clicks! I've had 7 different people using FF 1.5.0.6 say it works for them, and a few others say it doesn't. Asking them if they're using the activex plugin. It does not work on my test system with a fresh FF/1.5.0.6. Personally I can't believe that FF doesn't give you the option to run scripts like that. :rolleyes: :)

it's because a) activeX is a neusance, b) it's a security nightmare and c) it's useless. Anything you could do with ActiveX could be done with Javascript. MS invented ActiveX as another weapon in the browser wars.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.