3.2.0

AW.HTTP.Request keeps asking to authenticate + grid data not updated

Hi,
I just started testing AW version 2.0 with a cgi script that creates a text file loaded into: table=new AW.CSV.Table then grid.setCellModel(table);
Apache on RH9 is configured as:
<Directory "/usr/local/apache2/cgi-bin">
AuthType Basic
AuthName "Results"
AuthUserFile /usr/local/apache2/passwd/passwords
Require valid-user
</Directory>
Every time http.request() runs it prompts for user authentication. Before the cgi runs and generates the text file, http.request() returns and the code below it makes a table request & the grid is refreshed on the browser with previous data. I used http.onreadystatechange but made no difference. I assume I am missing code to wait for completion.

The code is below. If someone can help it will be greately appreciated. Thanks, Jose

var http=new AW.HTTP.Request;
http.setURL('https://192.168.1.253/cgi-bin/writecsv.cgi');
http.setRequestMethod('get');
http.setParameter(last_.getId(), trim(last_.getControlText()));
http.request();

var _response = table.response;
table.response = function(data)
{
_response.call(this, data);
....other code
grid.refresh();
}
table.request();
Jose
May 7,
Please disregard my problem. I found my solution of repeated authentication in Mozilla in the entry:
XMLHTTPRequest Authentication Bug & Solution
Wednesday, August 3, 2005
Changed aw.js from:this._http.open(this._requestMethod,URL,this._async,this._username,this._password);
to:this._http.open(this._requestMethod,URL,this._async);
I used http.setAsync(false) to wait table loading until http request completed.



Jose
May 7,

This topic is archived.

See also:


Back to support forum