EDIT: This is the page where you can find all the error stuff: http://google.intellectproductions.com/
I'm using this example for Google Search API:
<html>
<head>
<title>JSON/Atom Custom Search API Example</title>
</head>
<body>
<div id="content"></div>
<script>
function hndlr(response) {
for (var i = 0; i < response.items.length; i++) {
var item = response.items[i];
// in production code, item.htmlTitle should have the HTML entities escaped.
document.getElementById("content").innerHTML += "<br>" + item.htmlTitle;
}
}
</script>
<script src="https://www.googleapis.com/customsearch/v1?key=YOUR-KEY&cx=017576662512468239146:omuauf_lfve&q=cars&callback=hndlr">
</script>
</body>
</html>
However, that has a flaw in it and I have no idea why.
My script tag url is this:
<script src="https://www.googleapis.com/customsearch/v1?key={{MY KEY}}&cx=012495781369301842149:acs-gv099hu&q=runescape&callback=hndlr">
</script>
But with both examples it is giving me this error:
Uncaught TypeError: Cannot read property 'length' of undefined
Why would they post something that has an error in it?