How do i implement this script available on w3schools in Joomla 1.5? Ajax Database

I attempted to really make it work with Joomla and that i understand this error:

Not Found

The asked for URL /component/virtuemart/getcustomer.asp wasn't available on this server.

Furthermore, a 404 Not Found error was experienced while attempting to make use of an ErrorDocument to handle request.

Thanks.

Your server is worrying it cannot discover the file /component/virtuemart/getcustomer.asp, should you look into the code it's recommended at the base:

xmlhttp.open("GET","getcustomer.asp?q="+str,true)

So you have to add the server page too. Nevertheless the code succumbed that example (underneath the title "The AJAX Server Page") is ASP code therefore it will not work(unless of course your server both supports ASP &lifier PHP, most unlikely).

In a nutshell that example will not meet your needs. You have to look into the other example:
http://world wide web.w3schools.com/php/php_ajax_database.asp

You have to add both html page &lifier php page.