Hi Sulo,

To submit the user's query you can use customSearchControl.execute(
usersQuery); so you might need to do something like making the
customSearchControl a global or use a closure to reference it in your
go_google_go function.

Thank you,

Jeff


On Wed, Jun 23, 2010 at 5:56 AM, MrSulo <[email protected]> wrote:

> Hi Jeff,
>
> > Or you could add your own onkeyup handler. From there you can add your
> own
> > logic to submit or execute the query.
>
> sounds nice :) ....  but how can i start a submit?
>
> <script src="http://www.google.com/jsapi"; type="text/javascript"></
> script>
> <script type="text/javascript">
>
> google.load('search', '1');
> function onLoad()
> {
>        var customSearchControl = new
> google.search.CustomSearchControl('006146383332072746140:rc7_dtmydr0');
>        customSearchControl.enableAds(/* put your publisher ID here */);
>        var drawOptions = new google.search.DrawOptions();
>        // drawOptions.setInput(document.getElementById('query_input'));
>        drawOptions.setInput(document.getElementById('query_input').onkeyup
> =
> null;);
>        customSearchControl.draw('results', drawOptions);
> }
> google.setOnLoadCallback(onLoad);
>
>
> function go_google_go()
> {
>        // Start search
>        document.form.submit(); // ?
> }
> </script>
>
> <input type="text" id="query_input" name="query_input"
> onkeyup="go_google_go();" value="" />
> <div id="results"></div>
>
>
> kind regards
> Sulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google AJAX APIs" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-ajax-search-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to