Yes, this is for development only and the server is setup to show errors.
What I need is, display the error in a new javascript window.
function cm_handleRegShutdownDays() {
if(cm_xmlHttp.readyState == 4) {
if(cm_xmlHttp.status == 200) {
//success
//some code
}
else {
//error - display CF error page in a new window
document.getElementById('myTempDiv').innerHTML = cm_xmlHttp.responseText; //displays error in a defined div
}
}
}
I would like to open a new window inside the 'else' condition and write 'responseText' to the new window and display to the user. Is it possible ?
Originally Posted by kiteless
If the server displays the error message then you should be able to see it in the response. However, this is a very bad idea since it exposes sensitive information, which is the whole reason you DON'T show error messages to users. If this is for development only, you should be able to see the error in the response if the server is set up to show errors. You can also catch the error yourself using cferror or onError() and display that. Basically anything that the server would normally display on an HTML page will be in the response.
|