var msg = ""; msg = msg+"<%=errorMsg%>"; var error1 = msg.replace(/\r|\n|\r\n/g,""); alert(error1);
errorMsg consists of the following string which has \n or\r, I am not sure. "Node Controller 1 : AddToCluster; nested exception is: java.net.ConnectException: Connection timed out: connect"
The need to get an alert box with this message. But the error is "Unterminated String Constant". I am not able to pop the alert box.