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();
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,