Search code examples
javascriptjqueryasp.net-mvcwindowsiis-7.5

javascript/jquery, CSS not working properly on IIS hosted site


The JSON script below is working fine on my development machine. Now, I have hosted this MVC ASP.NET site on IIS 7.5 on Windows Server 2008 R2.

It shows many 'CSS not working' (specifically for JQGRID). Also it shows the ERROR below. I also faced one error on line - console.log('executed');. I removed this line and it stopped at the JSON below.

    var f = JSON.stringify({
        's': values, 'da': $('input[name=Days]').val(), 'date': $('#date').val(),
        'tv': $('#tv').html(), 'classCode': $('#ClassCodeValue').html(), 'section': $('#Sec').html(),
        'we': $('#We').html(), 'attendType': $('#AttendTypeValue').html(),
        'adClass': $('#adClass').val(),
        'variousLen': variousLen,
        'varDHour': varDHour,
        'varDMin': varDMin
    });

It is all working fine on development machine Windows 7 Professional.

I have given access to script folder and it looks like, jquery is working as it reach to this page on the website. but some of script or css not working properly as above issues.

Please suggest me what is wrong here.

I have been usin: IE 8 and IE 11.


Solution

  • It was weired issue. Actually, when i open hosted site on IE then site's mode is automatically set to compatibiity mode instead of standard mode. when i set its mode manually to standard mode then no such issue.

    i have added expliciltiy : as firlst line of HEAD element.

    Now, it works fine.. but it sets compaibitly view mode though most of the all issues are resolved. but some issue arise for jqgrid header CSS. if set standard mode then it works fine.

    If there is any way/suggestion to set on standard mode then it is best...exa- if browse has - IE9, IE9 comaptbility mode then above meta tag sets its mode to highest mode of that browser that goes to compabitlity mode.

    I am using itranet application.

    Thanks