10.6. The Google Local search service searches only in the location
specified by the setCenterPoint method of the GlocalSearch
object.
Fig. 10.6 Google Ajax Web Search
The search result gets displayed in expansion mode PARTIAL as
shown in Fig. 10.7.
Fig. 10.7 Results of Google Ajax Web Search
To display all the search results click on show all results as shown in
Fig. 10.8.
10.5 Web Search with Yahoo Web Services 203
Fig. 10.8 All Search Results
10.5 Web Search with Yahoo Web Services
Asynchronous JavaScript and XML (Ajax) is a web technique to transfer
XML data between a browser and a server without reloading the web page.
Ajax is implemented using the XMLHttpRequest object. A limitation
of XMLHttpRequest is that Ajax requests may be made only to the
same web server that serves the web page from which the Ajax request is
sent. If the web application is running on one server and the Web Service
is on another server an XMLHttpRequest request does not get sent.
Various methods are available to send an Ajax request to a remote server
some of which are digitally signing your scripts and using an alternative
XMLHttpRequest API. One of the methods, which we shall discuss in
this chapter, is to use a proxy web server that routes Ajax requests from
the web application to the Web Service.
204 10 Web Search with Ajax
Yahoo Search Web Services provides various services and content that
may be included to develop dynamic web applications.
Pages:
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183