It's tough to tell you exactly what to do without seeing exactly what  
you're doing, but in general, the answer to all your questions is  
yes.  Let's deal with each issue as you asked:

Can you specify the default search text? Assuming that, when you  
initialize your LocalSearch Control, you give it a handle to access it  
by, you can set the default string for the input by calling something  
like this:

lsc.searchForm.input.value = 'My Default Search Value';

Is there a way to programmatically click the Search button for  
someone? The LocalSearch Control has an execute method which is  
designed to do exactly this. The method accepts one argument, a string  
to search for, as below:

lsc.execute('My Search String');

Please note that, if you use the execute method and pass it a string  
to search for, the value of the input will be changed to that string.  
So, if you call the two lines above consecutively, you will end up  
with a search box with a value of 'My Search String.'

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On May 12, 2009, at 10:45 AM, Dennis G wrote:

>
> Hi everyone.
>
> My question is if you can specify the default search text that will
> appear in the Google Search Bar on a map I create.
>
> For example, I have a user click a link that says "Search for Banks"
> on my website and that shows the Google Search Bar with "Banks" pre-
> populated in the search box.
>
> I know that you can set the HINT text (http://www.google.com/uds/
> solutions/localsearch/reference.html#_searchformhinttext), but I want
> to have the text actually stay there onFocus.  Can you get at that
> text box to set a value?
>
> Also, is there a way to programmaticlly click the Search button for
> someone?  Ideally, I would like there to be a Search For Banks link on
> my site and when they click it, it will show the search box AND result
> set for that map with Banks being the search criteria.  I rather my
> user not have to type it in again - these are pre-set searches.
>
> Let me know if anyone has any ideas - thanks in advance for the help!
>
> Thanks,
>
> Dennis
>
> >


--~--~---------~--~----~------------~-------~--~----~
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