Getting error when creating datatable
Getting error when creating datatable
Hello,
I'm trying to create a DataTable and it's giving me issues. First, here is my code:
[code]
<html>
<head>
<link href="JQuery\jquery-ui.css" rel="stylesheet" />
<link href="JQuery\jquery-ui.structure.css" rel="stylesheet" />
<link href="JQuery\jquery-ui.theme.css" rel="stylesheet" />
<script type="text/javascript" src="JQuery\jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="JQuery\jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
</head>
<body>
Column 1 | Column 2 |
---|---|
Row 1 Data 1 | Row 1 Data 2 |
Row 2 Data 1 | Row 2 Data 2 |
</body>
</html>
[/code]
Here is the error message I get in the Chrome console:
http://www.shahspace.com/dtexample2/file_not_found.png
Surprisingly, this problem doesn't occur when I move the code to my server:
http://www.shahspace.com/dtexample2/
Can someone please explain why I have this problem on my desktop but not on my server? Thanks.
Answers
Your server version has this:
which I don't see in your posted code.
I had that line in the original post. This forum seems to delete that line if it detects it in posts.
But in any case, I found that if I prefix the references to cdn.datatables.net with http, it solves the problem.
//
is protocal relative. So if you used anything other thanhttps://
orhttp://
to load the host file, then yes, you would need to specify the protocol.Allan