Save document error handling

May 26 2008

  • 2 replies.
  • This question is not yet resolved.
  • This question was started by Mohamed.
  • Last post by Mohamed.
Mohamed
member
26 May, 14:43
Hi,

I am using the following code, I would like to know if there is a way to catch errors occurring while saving and display a nice message (for example user not authenticated ...).

IO.setSaveXMLFunction(saveFunction);

function saveFunction (xmlURI, xmlDocument) {
HTTPTools.postXML("/pon/xopus", xmlDocument, "UTF-8");
}

Thanks in advance,

Mohamed
Carl
Xopus Team
26 May, 14:58
If you take a look at the documentation for postXML, you will see that the function returns the server response. So if anything goes wrong while saving you can alert that, or print it in a box.

var response = HTTPTools.postXML("/pon/xopus", xmlDocument, "UTF-8");

I hope that answers your question.
Mohamed
member
04 July, 13:23
yes it perfect.

Thanks,


React

HTML will be shown as HTML code.
Linebreaks and Links starting with http:// are automatically resolved