Just give the input box focus
eg.
for this form
<form name="myform">
<input type="text" name="q" />
</form>
you can use something like
window.onload=function(){
document.myform.q.focus();
};
Cheers!
Vision Jinx
Jeremy R. Geerdes
Effective website design & development
Des Moines, IA
For more information or a project quote:
http://jgeerdes.home.mchsi.com
jrge...@gmail.com
If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
> --
> You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
> To post to this group, send email to google-ajax...@googlegroups.com.
> To unsubscribe from this group, send email to google-ajax-searc...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
>
On Feb 7, 3:23 am, Jeremy Geerdes <jrgeer...@gmail.com> wrote:
> To visionjinx's response, I would add that, if you're using the standard SearchControl, you can call searchControl.input.focus() to put the cursor in the search box.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
A small note to setting input.focus(): if you do that in Firefox in
the onload, it only works if you make use of a timeout...:
function setcursor()
{
document.getElementById('input').focus();
}
setTimeout('setcursor()',200);
Cheers,
Ruben
BTW:
If I'm not mistaken, setting focus on the search box might cause a
branding issue in at least one case: for the Custom Search Control
with 'watermark' branding.
Alternative Custom Search branding options, using static logos
displayed outside of the search box, have long been provided and
documented for the older non-AJAX search form implementations
available for CSEs.
http://code.google.com/intl/en/apis/customsearch/docs/ui.html#other_searchbox
I wonder why such alternative branding options are not currently
provided or documented for use with the Custom Search Control and
Custom Search Element?
-- omr
--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/0491de7a-d46c-4804-b1e4-1912c3b2b8b1%40googlegroups.com
For more options, visit this group at
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.