I'm using DataTables with a JSON database. When I try to preview my site, this error message comes up in Opera and Chrome. It works in IE, but I have to click "Allow blocked content." It also works when I upload it to my domain.

The error message links here: http://datatables.net/manual/tech-notes/7

Not sure how to make my browser allow the script.

Here is my header:

<link type="text/css" rel="stylesheet" href="style/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="style/css/main.css" />
<link type="text/css" rel="stylesheet" href="datatables/media/css/jquery.dataTables.css" />
<script type="text/javascript" src="style/js/bootstrap.js"></script>
<script type="text/javascript" src="datatables/media/js/jquery.js"</script>
<script type="text/javascript" src="datatables/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="style/js/datatables.js"></script>
有帮助吗?

解决方案

You must have specified LOCALHOST by using any of local web server.. if you are accessing external files for data. i.e. Wamp, or Xamp.. there are few more too. ... as you said.. it works when you uploaded on website.. its mean you are using external contents being called (ajax).. isn't it.. ?

If so please download and install wampserver. Its free and easy to install.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top