LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   AJAX and boa issue (http://www.linuxquestions.org/questions/linux-server-73/ajax-and-boa-issue-541819/)

simon_qwl 03-30-2007 01:44 AM

AJAX and boa issue
 
Hi all,
recently i am studying on AJAX. According my understanding, AJAX focus on client side by javascript,css then it supposed to work with whatever language on server side. therefore, i intend to integrate AJAX with cgi program on a boa server. however, when the object of XMLHttpRequest() sends data to server, a error message "400 Bad Request" is given and "Unknow Content-Length Post" error message on server side.
anyone encountered this problem before?is this problem caused by my misunderstand or boa server?

thanks for any advices!

simon_qwl 03-31-2007 01:43 PM

I tried to send data back to server in another way:

Code:

var query="/cgi-bin/ajaxtest";
 query=query+"?message="+str;
 xmlHttp.open("get",query,true);
 xmlHttp.send(null);

the cgi program can receive data from CONTENT_LENGTH environment variable but the last character is missed. so far, this is the only way i tried that the cgi program can receive data from javascript.any idea?


All times are GMT -5. The time now is 11:30 AM.