locked
javascript and IIS6 RRS feed

  • Question

  • User106761762 posted
    Hi, I published a web application on my IIS (Windows 8.1) and work fine, It has to show two sections, the first one with information a the second one with images. When testing it on the Host only show the fisrt section and does not mark any error. This is part of my webpage code, I wonder if the reference to the javascript is the cause of the problem or the IIS does not wirk with it.

    <head runat="server">
    <title>Cobe Ciudadano</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7;IE=edge;Chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link href="Content/bootstrap.min.css" rel="stylesheet" />
    <link href="Content/bootstrap.css" rel="stylesheet" />
    <link href="Content/Style.css" rel="stylesheet" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src="http://cdn.rawgit.com/elevateweb/elevatezoom/master/jquery.elevateZoom-3.0.8.min.js"></script>
    <script type="text/javascript">
    $(function () {
    $("[id*=DataList1] img").elevateZoom({
    cursor: 'pointer',
    imageCrossfade: true,
    loadingIcon: 'loading.gif'
    });
    });
    Wednesday, December 12, 2018 3:08 PM

All replies

  • User475983607 posted

    The browser makes the HTTP request and fetches the js files not IIS.  You need to make sure the URL is correct.

    This code always looks for a Content folder in the current active folder.

    <link href="Content/bootstrap.min.css" rel="stylesheet" />

    Maybe use a relative reference from the root.

    <link href="/Content/bootstrap.min.css" rel="stylesheet" />

    Also, the browser's dev tools has a network trace utility that will show 404 errors when the URL is incorrect.

    Wednesday, December 12, 2018 3:22 PM
  • User753101303 posted

    Hi,

    Use F12 Network to see what happens. My understanding is that you are testing with a browser on the web server which may not have access to the internet...

    Wednesday, December 12, 2018 3:25 PM
  • User1520731567 posted

    Hi alfredo2002,

    Does this line: $("[id*=DataList1] img") has img?

    I suggest you could open F12 developer tool to check if the object has img.

    Like the picture:

    Best Regards.

    Yuki Tao

    Tuesday, January 8, 2019 2:40 AM