word not supported'');
}
this.readyState = 1;
if (this.onreadystatechange)
{
this.onreadystatechange();
}
};
this.send = function(data)
{
if (!navigator.javaEnabled())
{
alert("XMLHttpRequest.send() - Java must be installed and enabled.");
return;
}
if (this._async)
{
setTimeout(this._sendasync, 0, this, data);
}
else
{
this._sendsync(data);
}
};
this._sendasync = function(req, data)
{
if (!req._aborted)
{
req._sendsync(data);
}
};
this._sendsync = function(data)
{
this.readyState = 2;
if (this.onreadystatechange)
{
this.onreadystatechange();
}
var url = new java.net.URL(new java.net.URL(window.location.href), this.url);
var conn = url.openConnection();
for (var i = 0; i < this._headers.length; i++)
{
conn.setRequestProperty(this._headers[i].h, this._headers[i].v);
}
this._headers = [];
if (this.method == ''POST'')
{
// POST data
conn.setDoOutput(true);
var wr = new java.io.OutputStreamWriter(conn.getOutputStream(), this._getCharset());
wr.write(data);
wr.flush();
wr.close();
}
// read response headers
// NO