First I found the demo in google doc:

HTML Code:
    <title>JSON/Atom Custom Search API Example</title>
    <div id="content"></div>
      function hndlr(response) {
          // handle result
    <script src="">
And it works fine.

But know I want to trigger the "search process" inside a js file say mySearch.js, so how can I get this done ?


HTML Code:
var XXXLayer = cc.Layer.extend({
    init:function () {
        var theUrl = '';

        // what to do here ???????

        return true;
    hndlr:function(response) {
          // handle result
Any suggestion would be appreciated thanks