Skip to content

Commit a8580ad

Browse files
FIXED: IE browser compatibility is again fixed by changing server response content type to text/plain, and the jquery post to expect 'text' back, so consistent text back is easier to parse into jquery DOM.
1 parent 20b29f0 commit a8580ad

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

rqlconnector/RqlConnector.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,39 @@ RqlConnector.prototype.SendRqlWebService = function (InnerRQL, IsText, CallbackF
4545
SOAPMessage += '<s:Body><q1:Execute xmlns:q1="http://tempuri.org/RDCMSXMLServer/message/"><sParamA>' + this.padRQLXML(InnerRQL, IsText) + '</sParamA><sErrorA></sErrorA><sResultInfoA></sResultInfoA></q1:Execute></s:Body>';
4646
SOAPMessage += '</s:Envelope>';
4747

48-
$.post(this.WebService11ProxyUrl, {rqlxml: SOAPMessage, webserviceurl: this.WebService11Url},
49-
function (data) {
50-
var RetRql = $(data).find('Result').text();
51-
52-
if (IsText) {
53-
data = RetRql;
54-
}
55-
else {
56-
data = $.parseXML($.trim(RetRql));
57-
}
58-
59-
CallbackFunc(data);
60-
});
48+
$.post(this.WebService11ProxyUrl, {rqlxml: SOAPMessage, webserviceurl: this.WebService11Url}, function (data) {
49+
data = $.trim(data);
50+
51+
var RetRql = $($.parseXML(data)).find('Result').text();
52+
RetRql = $.tr(RetRql);
53+
54+
if (IsText) {
55+
data = RetRql;
56+
}
57+
else {
58+
59+
data = $.parseXML(RetRql);
60+
}
61+
62+
CallbackFunc(data);
63+
}, 'text');
6164
}
6265

6366
RqlConnector.prototype.SendRqlCOM = function (InnerRQL, IsText, CallbackFunc) {
6467
var Rql = this.padRQLXML(InnerRQL, IsText);
6568
$.post(this.DCOMProxyUrl, {rqlxml: Rql}, function (data) {
69+
data = $.trim(data);
70+
6671
if (IsText) {
6772
// do nothing
6873
}
6974
else {
70-
data = $($.trim(data));
75+
76+
data = $.parseXML(data);
7177
}
7278

7379
CallbackFunc(data);
74-
});
80+
}, 'text');
7581
}
7682

7783
RqlConnector.prototype.padRQLXML = function (InnerRQL, IsText) {

rqlconnector/rqlaction.asp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%
2-
Response.ContentType = "text/xml; charset=utf-8"
2+
Response.ContentType = "text/plain; charset=utf-8"
33
44
Session.Timeout = 180
55
Server.ScriptTimeout = 180

rqlconnector/rqlactionwebservice.aspx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class RqlWebServiceConnector
44
{
55
public string SendRql(string Rql)
66
{
7-
HttpContext.Current.Response.ContentType = "text/xml; charset=utf-8";
7+
HttpContext.Current.Response.ContentType = "text/plain; charset=utf-8";
88
return SendRqlToWebService(Rql);
99
}
1010

0 commit comments

Comments
 (0)