Solved

Problems running js files on MS-IIS.

Posted on 1998-08-20
6
419 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

929 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

12 Experts available now in Live!

Get 1:1 Help Now