开发者

External Javascript loading on Google Chrome, Not Firefox 4 (Error 400)

I am working on an application in ASP.NET Development Server 10.0.0.0 that uses external javascript that I reference from the current working page. Namely, this is the file hierarchy from the root directory:

  • js
    • jquery-1.5.min.js
  • ...
  • student
    • js
      • Course.js
      • Plan.js
      • (etc)
    • ...
    • plan.aspx [current working page]

In plan.aspx, in the main body of the page (outside of the header), I am make a number of calls to these javascript pages:

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" src="..\js\jquery-1.5.min.js"></script>
 <script type="text/javascript" src=".\js\HTMLTrees.js"></script>
 <script type="text/javascript" src=".\js\Course.js"></script>
 <script type="text/javascript" src=".\js\Schedule.js"></script>
 <script type="text/javascript" src=".\js\Plan.js"></script>
 ...
</asp:Content>

Google Chrome (11.08) and Internet Explor开发者_StackOverflow中文版er 8 are able to locate the files just fine and begin the execution of the scripts. Firefox 4 and previous versions are unable to locate the file, as each request returns an error code (400 - Bad Request).

Help me out?


Firefox encodes backslashes in URL as %5C. Unless you have a fix on a server side, it won't work.

Standart dictates to use forward slashes for URLs, so I guess you should change backslashes to forward slashes in URLs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜