Solved

Problems running js files on MS-IIS.

Posted on 1998-08-20
6
418 Views
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" >
</SCRIPT>
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?
0
Comment
Question by:Gadi031698
  • 3
  • 2
6 Comments
 

Author Comment

by:Gadi031698
ID: 1269469
Edited text of question
0
 

Author Comment

by:Gadi031698
ID: 1269470
Adjusted points to 150
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1269471
Can you send me the .js file and the associated page?  masseym@hotmail.com
0
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

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

application/x-javascript

js is executed by the browser, not the server.
0
 

Author Comment

by:Gadi031698
ID: 1269473
mplungjan,
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?
Gadi
0
 
LVL 75

Expert Comment

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

   1.From the server, run REGEDT32.
   2.Goto
     HKEY_LOCAL_MACHINE
     SYSTEM
     CurrentControlSet
     Services
     InetInfo
     Parameters
     MimeMap
   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.
   7.an "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

Michel
0

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 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) 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