2011-10-10 89 views
1

如何在Joomla 1.5中的w3schools上實現此腳本? Ajax DatabaseJoomla中的Ajax數據庫

我試圖使它爲Joomla工作,我得到這個錯誤:

Not Found 

The requested URL /component/virtuemart/getcustomer.asp was not found on this server. 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 

謝謝。

回答

1

您的服務器抱怨它無法找到該文件/component/virtuemart/getcustomer.asp,如果你檢查它在底部引用的代碼:

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

所以,你需要添加服務器頁爲好。然而,該示例中給出的代碼(在「AJAX服務器頁面」標題下)是ASP代碼,因此它不起作用(除非您的服務器都支持ASP & PHP,不太可能)。

總之,這個例子不適合你。您需要檢查其他例如:
http://www.w3schools.com/php/php_ajax_database.asp

您需要添加兩個& html頁面的PHP頁面。

+0

感謝您的建議。 – user747192