onKeyUp - running a PHP script

JavaScript and client side scripting.

Moderator: General Moderators

User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: onKeyUp - running a PHP script

Post by pickle »

Basically the setup is like this:

1) User types something
2) Javascript grabs what user types
3) Javascript makes an AJAX call to a PHP page, sending along what the user typed as a $_GET variable
4) PHP runs a query based on what was submitted to it
5) PHP generates some output.
6) Javascript accepts that output and does something to the page depending on what that output was.

You're going to have to do some research - either with jQuery or plain javascript - to figure out how to do it. I'm not getting the sense you're spending a whole lot of time trying to figure it out yourself.

Also, try searching Google for "auto suggest" rather than "auto complete"
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply