« Previous Next »

Thread: IIS not running Embedded Java Scripts

Last post 04-15-2009 3:25 AM by akisiel. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 01-31-2007, 4:33 AM

    IIS not running Embedded Java Scripts

    Hi,

     This is a query that has been puzzling me for a while now. I have a server running IIS 6 and have uploaded my website that is written in HTML but has some embedded Java Scripts to handle Menu's etc.

     The Website runs fine on other Hosting services just not my own IIS webserver - I can make the domain name point to any of the HTML pages no problem but my menu and links are written in Java Script and they are not showing, although everything is uploaded as it should be.

     I have allowed everything in the server extensions to run, is there a new extension that I must load in order for my Java script to run,. MIME or something??

     This is not a browser Issue as I can connect to the pages through the FTP site and everything loads as it should.

     Any advice offered would be much appreciated.

     

    Rob

     

  • 01-31-2007, 8:17 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,189
    • IIS MVPs

    Re: IIS not running Embedded Java Scripts

    Are the scripts inline with the HTML or sourced from another file?  IIS doesn't execute client scripts, but if the .js mime-type is not registered it will not serve them.
  • 02-01-2007, 4:33 AM In reply to

    Re: IIS not running Embedded Java Scripts

    Hi There - not quite sure what you mean by inline with HTML - I have an index page written in HTML that has pointers or mappings for the header and menu tab that points to seperate .js files located in the same directory.

     I have added the .js MIME extension to the HTTP header option and also allowed scripts to run through directory security.

     However - when i try to browse the .js files through the IIS management console i get this page cannot be displayed HTTP: 500 error, however if I open the HTMl pages they load fine - also if I open the index.htm through windows explorer all the jave scripts work properly.

     this one is really baffling me - thanks for your reply, much appreciated.

  • 02-01-2007, 6:30 AM In reply to

    Re: IIS not running Embedded Java Scripts

    Discovered and resolved this issue.

     Once I tried to open the .js files through windows explorer I had an error messege -

     

    syntax error - code 800a03ea , microsft jscript compilation error.

     This means that IIS / Windows 2003 server was interpreting my java script extensions .js to be Jscript which is a different older extension for something completely different -

      I simply changed all the .js script extensions to .txt and updated all reference pointers on the other HTML pages to point to the .txt and not .js - low and behold IIS now shows all the relevant menu's and functions of my website. .js script functions are all included within the script so it doesn't matter if it's txt or .js, unlike batch files.

     Thanks for all your interest - I hope this resolution comes in handy for others on this forum.

     

    Rob Hughes - pcstechnical

    www.pcstechnical.co.uk (now working in all it's glory, apart from a few typo's that will soon been ironed out) : -}

  • 02-01-2007, 8:14 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,189
    • IIS MVPs

    Re: IIS not running Embedded Java Scripts

    pcstechnical:
    I ... also allowed scripts to run through directory security.
    For clarification, IIS does not run client-side scripts, which you seem to be describing.

    Glad you were able to sort it out.

  • 04-09-2009, 8:05 AM In reply to

    • akisiel
    • Not Ranked
    • Joined on 04-09-2009, 8:00 AM
    • Posts 3

    Re: IIS not running Embedded Java Scripts

    hello everybody

    I'm quite new with all this things and I would like to know the anwswer to the "just embedded javascript" and not a .js file

    I have a collapse/expand function written with javascript. I had a server crash so now I have a new one... before I had this menus working but now I just see the text?

    coululd you please give me some advise? (iis 6.0 and w2000 server)

    thanks!

  • 04-09-2009, 10:25 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,189
    • IIS MVPs

    Re: IIS not running Embedded Java Scripts

  • 04-14-2009, 3:07 AM In reply to

    • akisiel
    • Not Ranked
    • Joined on 04-09-2009, 8:00 AM
    • Posts 3

    Re: IIS not running Embedded Java Scripts

    hi tomkmvp,

    sorry for the late posting but just coming from holidays.

    source code is:

    ---

    <html>

    <head>

    <meta
    name="GENERATOR" content="Microsoft FrontPage 6.0">

    <meta name="ProgId" content="FrontPage.Editor.Document">

    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

    <title>Stores Capacities</title>

    <link REL="stylesheet" HREF="../Stores.Capacities/HojadeEstilos.css" TYPE="text/css">

    <script language="javascript">

    function expand(s)

    {

    var td = s;

    var d = td.getElementsByTagName("div").item(0);

    td.className = "menuHover";

    d.className = "menuHover";

    }

    function collapse(s)

    {

    var td = s;

    var d = td.getElementsByTagName("div").item(0);

    td.className = "menuNormal";

    d.className = "menuNormal";

    }

    </script>

    </head>

    <body bgcolor="#C0C0C0">

    <div align="center">

    <center>

    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1" bgcolor="#FFFFFF">

    <tr>

    <td width="100%">

    <p align="center"><br>

    <img border="0" src="../Stores.Capacities/images/Logo.bmp"><br>

    <br>

    </p>

    </td>

    </tr>

    <tr>

    <td width="100%" background="../Stores.Capacities/img/backgroundXRT.jpg">

    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">

    </table>

    <table class="navbar" width="100%" bordercolor="#616D7E" background="../Stores.Capacities/img/backgroundXRT.jpg">

    <tr>

    <td class="menuNormal" width="15%" align="center" onmouseover="expand(this);" onmouseout="collapse(this);">

    <p>Store Maintenance</p>

    <div class="menuNormal" width="155" align="left">

    <table class="menu" width="155">

    <tr>

    <td class="menuNormal" width="154">

    <a target="main" href="../Stores.Capacities/StoresMaintain.asp" class="menuitem">Create/Modify Stores</a></td>

    </tr>

    </table>

    </div>

    </td>

    <td class="menuNormal" width="15%" align="center" onmouseover="expand(this);" onmouseout="collapse(this);">

    <p>Other Maintenance</p>

    <div class="menuNormal" width="200" align="left">

    <table class="menu" width="200">

    <tr>

    <td class="menuNormal" width="200">

    <a target="main" href="../Stores.Capacities/FurnituresMaintain.asp" class="menuitem"> --> Furnitures</a></td>

    </tr>

    <tr>

    <td class="menuNormal" width="200">

    <a target="main" href="../Stores.Capacities/AccesoriesMaintain.asp" class="menuitem"> --> Accesories</a></td>

    </tr>

    </table>

    </div>

    </td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td width="5%"></td>

    <td class="menuNormal" width="10%" align="center">

    <a target="main" href="../Stores.Capacities/logout.asp" class="menuitem">

    <p>Logout </p>

    </a></td>

    </tr>

    </table>

    </td>

    </tr>

    <tr>

    <td width="100%">

    <p>&nbsp;<iframe name="main" src="../Stores.Capacities/userLogin.asp" width="99%" height="675" frameborder="0" target="bottom" scrolling="no"></iframe>

    </p>

    </td>

    </tr>

    <tr>

    <td width="100%" background="../Stores.Capacities/img/backgroundXRT.jpg">

    <marquee scrolldelay="250"><p align="center">

    <font face="Arial" size="1" color="#808080">Stores capacities management v.1.3

    - November 2007</font></p></marquee></td>

    </tr>

    </table>

    </center>

    </div>

    <iframe
    name="SQL" src width="0" height="0" frameborder="0" marginwidth="1" marginheight="1" scrolling="no">

    </iframe>

    </body>

    </html>

      ---

     they are seen as links and not like a menu as were shown before server crash.

    If I view source code I just can see javascrpit functions added to check user/password. I made no modifications to source code since server crash except from adding language that before was not specified.

    thanks againg for your help.

    regards,

    Ale.-

     

     

     

  • 04-14-2009, 8:01 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,189
    • IIS MVPs

    Re: IIS not running Embedded Java Scripts

  • 04-15-2009, 3:25 AM In reply to

    • akisiel
    • Not Ranked
    • Joined on 04-09-2009, 8:00 AM
    • Posts 3

    Re: IIS not running Embedded Java Scripts

    thanks again tomkmvp for your answer.

    once again you are right. css file was not working and I didn't realize before. now I'm using css file from "repository" with menu information (such as a.menuitem:hover, a.menuitem:active ) - (I will ask system administrator to check backups because I don't understand why recovered files were not up-to-date)

    sorry for bothering, I was so sure it was a server problem due to crash that I didn't pay attention to any other option.

    I will review css usage in order to fix completely and also to get a properly usage of css files.

    thanks again.

    Ale.-

Page 1 of 1 (10 items)
Microsoft Communities