146 views

Description

Generated JavaScript in the API Explorer contains an error in the if condition: if(this.readyState = this.DONE)

Steps to Reproduce

  1. Navigate to System Web Services > REST > REST API Explorer.
  2. Pick any API template and fill out the applicable information to test the specified API
  3. Click the JavaScript code snippet link and observe

Workaround

Modify the JavaScript code statement. In the following JavaScript code block:

client.onreadystatechange = function() { 
if(this.readyState = this.DONE) {
document.getElementById("response").innerHTML=this.status + this.response;
}
};

Change the single equals operator (=) in the if check to an equality (==) operator as follows:

client.onreadystatechange = function() { 
if(this.readyState == this.DONE) {
document.getElementById("response").innerHTML=this.status + this.response;
}
};

 


Related Problem: PRB670554

Seen In

There is no data to report.

Fixed In

Jakarta

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-01-25 02:56:26
Published:2016-10-06