Problems running js files on MS-IIS.

Posted on 1998-08-20
Last Modified: 2009-12-16
We have installed IIS 4.0, and try to operate our application there (HTML+client JavaScript+PERL CGIs).
We could operate JavaScripts that were written in the same file as the HTML.
We could not operate JavaScripts that were on a separate file with a ".js" extension:
<SCRIPT LANGUAGE="JavaScript" SRC="test.js" >
In the application mapping (In the definition of the site->Properties->Home Directory->Configuration) we mapped "js" to "Jscript.dll".
The result was some numbers thrown on the browser -
16389 (0x00004005).
What's wrong with what we had done, and what should be done?
How can one operate from IIS a JavaScript which is in a different file than the HTML?
Question by:Gadi031698
  • 3
  • 2

Author Comment

ID: 1269469
Edited text of question

Author Comment

ID: 1269470
Adjusted points to 150
LVL 10

Expert Comment

ID: 1269471
Can you send me the .js file and the associated page?
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

LVL 75

Accepted Solution

Michel Plungjan earned 150 total points
ID: 1269472
You need to map it to the mime type


js is executed by the browser, not the server.

Author Comment

ID: 1269473
I have definition for this mime-type in my browser, but I think there should be a similar one on the server. Where is the exact place this definition should be?
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1269474
Setting MIME Type for JS on Microsoft IIS3 Server

   1.From the server, run REGEDT32.
   3.From the menu bar, select Edit, Add Value,
   4."Add Value" dialog box prompts for the "Value Name"
   5.Enter "application/x-javascript,js,,<" Don't enter the quotes.
   6.Press Enter. "String Editor" dialog box prompts for the "String"
   8.Press Enter, we leave it blank.
   9.You should be able to find application/x-javascript in the list now.

Setting MIME Type for JS on Microsoft IIS4 Server

        Go into the IIS4 Manager

        Right-click on your IIS4 server name and choose Properties.

        Click on the "File Types" button under Computer MIME Map.

           Extension     Content Type
           ---------     ------------
           .js           application/x-javascript

Hope this helps


Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now