• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

auto completion

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My task is when a name is entered in a text field to get all the names from the database and it should be displayed under the text field ... which is similar to auto complete .

Help me out to complete the task.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried to use one of the many Ajax tutorials out there on sending data to the server and retrieving it?

Eric
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest you checkout DOJO, it's one of the easiest AJAX scripts I've seen so far.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shankar Arumugam:
Hi,
My task is when a name is entered in a text field to get all the names from the database and it should be displayed under the text field ... which is similar to auto complete .

Help me out to complete the task.

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Easiest solution for this is to send ajax request to server by putting onkeyup event and collect response data and display it below test field.

if you want ajax code snippet for this then i can send you.

Thank You.
Have a Nice Time.

-Santosh
 
Shankar Arumugam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i like to use ajax tags for that one...
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must admit that I have never heard of Ajax tags.

Ajax is a name given to a collection of technologies which work very nicely together - usually HTML, CSS, and JavaScript, and most often implies sending requests to a server asynchronously ("behind the scenes") without reloading the entire page.

In order to accomplish what you are describing, you will need to ask your database for some information behind the scenes, and then make sure that you have the ability to get the response back.

This usually entails writing a server side script which your javascript calls when 'something happens', and then that server side script does the heavy lifting, sending back only the information that you asked for.

You then use javascript to insert that information into the page.

I would suggest reading some tutorials on the subject rather than copying and pasting code, as it can get pretty confusing if you don't understand the basics of what is going on - and therefore incredibly difficult to troubleshoot and debug.
[ July 16, 2008: Message edited by: Katrina Owen ]
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"rajani v", please check your private messages for an important administrative matter.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic