Reputation: 1263
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("search", "1");
</script>
</head>
<body>
<h1></h1>
<div>
<script>
(function() {
var cx = 'SECRET';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
</body>
GET https://www.google.com/uds/?file=ads&v=3&packages=search&async=2 jsapi:21 google.(anonymous function).djsapi:27 (anonymous function)jsapi:18 (anonymous function)jsapi?autoload={"modules"%3A[{"name"%3A"search"%2C"version"%3A"1.0"%2C"callback"%3A"__gcse.scb"%2C"…:41 (anonymous function)
I have my code above. I'm getting the following error in my console. I'm getting search results which is good, but the error is creating other problems on my site. Do you know what could be causing this?
Thanks!
Upvotes: 4
Views: 3749