Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

I cranked up some code to make a google suggest like functionality using AJAX. Check out the image below:

Google Suggest using AJAX

Although its not perfectly working but you can get an idea how the things work and you can enhance it.

Here is the JavaScript code:

<script language = "javascript"> 

function GetWords(pressevent,myVal) 
var charCode = (pressevent.which) ? pressevent.which : (

// Check for the enter key
if(charCode!= 13) 
if(charCode == 32) 

// Put the value from the from the DIV into the TextBox 
var word = document.getElementById("MyDiv").innerHTML; 
value = word.substring(0,word.length - 4); 

function GetWords_CallBack(response) 
    document.getElementById("MyDiv").innerHTML = response.

For the complete article please visit:


powered by IMHO


Posted on Saturday, October 1, 2005 8:21 PM | Back to top

Comments on this post: Google Suggest like feature using AJAX

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Mohammad Azam | Powered by: