function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RossGRossG 

Google Custom Search Element Control API and Visualforce

I'm messing with the Google Custom Search Element Control API in visualforce but can't seem to get it to save.

Does anyone know why this won's save?  Obviously I don't know anything about javascript in vf:

<apex:page >
<html>
<head>
<title>my site</title>

</head>
<body>
<div1></div1>
<script>
  (function() {
    var cx = '011892776069086249599:duc4yrcsujq';
    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>
<div2></div2>
</body>
</html>
</apex:page>