After a cursory glance, your code looks right, but it is exceedingly difficult to tell for sure given the way that Groups reformats code. Please provide a link to your application or, if that is absolutely impossible, a link to a pastebin of your code so that we can tell for sure.
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 Apr 9, 2009, at 10:48 AM, KParmar wrote: > > Hello, > I am using Ajax Search APIs to implement search in our application. > Google returns the search results correctly but my code doesn't return > anything. The code does work for other sites like amazon.com etc. but > not for my site. > This is the code I am using - > > <script src="http://www.google.com/jsapi" type="text/javascript"></ > script> > > <script language="Javascript" type="text/javascript">//<![CDATA[ > google.load('search', '1'); > > function OnLoad() { > // Create a search control > var searchControl = new google.search.SearchControl(); > > // Add in a WebSearch > var webSearch1 = new google.search.WebSearch(); > > webSearch1.setSiteRestriction('otkextqa.psav.com/ > WHotelLosAngeles'); > > //Expand Mode > var options = new google.search.SearcherOptions(); > options.setExpandMode > (google.search.SearchControl.EXPAND_MODE_OPEN); > > // Add the searcher to the SearchControl > searchControl.addSearcher(webSearch1,options); > > // tell the searcher to draw itself and tell it where to attach > searchControl.draw(document.getElementById("content")); > > var searchstr = 'campos' > // execute an inital search > searchControl.execute(searchstr); > } > > google.setOnLoadCallback(OnLoad,true); > //]]> > </script> > > Any help would be greatly appreciated. > > Thanks, > Kirti > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
