How to do an ajax to google custom search website?

How to do an ajax to google custom search website?

After the first time the user clicked the search button, the result from google custom search loads fine but additional searches did not trigger the google custom search again.

<script>
  (function() {
    var cx = '004626212387516433456:aex2tyveipy';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = ' https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:searchresults-only></gcse:searchresults-only>

Inside the document.eventListener, we have this:

$('.on-search-form').on('submit', function(){
searchhelper.search(searchhelper.current_tab);
return false; // don't *submit* submit
});

But looks like the google custom search did not get executed.