Loading

Monday, January 14, 2008

Handling the data Google sends you

What does the code look like in google.html? The text field where the user enters text is tied to a function named getSuggest by using the onkeyup event. As a result, getSuggest will be called every time the user types and releases a key. (Note that the event object is passed to getSuggest by this code, because that object holds information about which key was pressed, and also note the <div> element where the suggestions will appear,targetDiv.)

Here’s what the code looks like:

<body>
<H1>Google live search</H1>
Search for <input id = “textField” type = “text” name = “textField” onkeyup = “getSuggest(event)”>

<div id = “targetDiv”><div></div></div>
</body>

SHARE TWEET

Thank you for reading this article Handling the data Google sends you With URL http://x-tutorials.blogspot.com/2008/01/handling-data-google-sends-you.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Handling the data Google sends you above!