You need to use a XMLHttp request to send the data - using either GET or POST - and also receiving the answer.
Have a look and the first post of this thread to get an idea how to use the XMLHttp object to validate data remotely, without submitting the current form. Also try googling

Happy Coding!