<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <script type="text/javascript"> function isIE() { var ua = navigator.userAgent; if (ua.indexOf("MSIE") < 0 && ua.indexOf("Trident") < 0) { // not IE return false; } else { // IE return true; } } function ConnData(xml) { // Packing XML Code xml = '' + xml; var xmlDom; if (!isIE()) { // code for others var parser = new DOMParser(); xmlDom = parser.parseFromString(xml, "text/xml"); } else { // code for IE xmlDom = new ActiveXObject("Microsoft.XMLDOM"); xmlDom.loadXML(xml); } // XMLHttpRequest Open & Send var xmlHttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlHttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } try { xmlHttp.open("POST", "http://gpwfstg.hlcm.com/wp/approval/Forms/Facade.aspx", false); } catch (e) { // Exception Handling /* ### Write Code ### */ } try { xmlHttp.send(xmlDom); } catch (e) { } // Get XHR Result var xmlResult = xmlHttp.responseXML; // Extract Result Code var resultCode = ""; if (xmlResult.evaluate) { var nodes = xmlResult.evaluate("RESULT/RESULTCODE", xmlResult, null, XPathResult.ANY_TYPE, null); resultCode = nodes.iterateNext().textContent; } else { resultCode = xmlResult.selectSingleNode("RESULT/RESULTCODE").text; } // Extract Result URL var draftUrl = ""; if (xmlResult.evaluate) { var nodes = xmlResult.evaluate("RESULT/DRAFTURL", xmlResult, null, XPathResult.ANY_TYPE, null); draftUrl = nodes.iterateNext().textContent; } else { draftUrl = xmlResult.selectSingleNode("RESULT/DRAFTURL").text; } if (resultCode != "00000") { // Error Handling /* ### Write Error Handling Code ### */ if (resultCode.indexOf('Z') > -1) { } else if (resultCode.indexOf('A') > -1) { } else if (resultCode.indexOf('B') > -1) { } else if (resultCode.indexOf('F') > -1) { } else { } } else { // // Open Doodream Approval Popup window.open(draftUrl, "", "width=940, height=650, scrollbars=yes, toolbar=no, location=no, status=no, menubar=no"); } } function xx() { return "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<CONNROOT>\n" + " <CONN>\n" + " <KEYCODE>EHR-487F7D8F-5799-411E-943A-F0FAC161C8BC</KEYCODE>\n" + " <UNIQUEID>924556</UNIQUEID>\n" + " <RETURNURL>\n" + " <URLPATH>http://dghr.corp.hlcm.com/odm/dg_odm010_dd_r04.jsp</URLPATH>\n" + " <LOGINID></LOGINID>\n" + " <PASSWORD></PASSWORD>\n" + " <RETURNFIELDLIST>UNIQUEID,DOCID,APRDOCSTATE,APRDOCSTATEMESSAGE,APPROVER_USERID,PPROVER_USERNM,APPROVER_TITLE,APRTYPE,\n" + " APPROVER_PROCESSDATE, AGENTAPPROVER_USERID,AGENTAPPROVER_USERNM,AGENTAPPROVER_TITLE </RETURNFIELDLIST>\n" + " </RETURNURL>\n" + " </CONN>\n" + " <DOC>\n" + " <DOCTITLE>工作申请禀议</DOCTITLE>\n" + " <BODYTEXT><![CDATA[<!----- * 1. 考勤申请人信息----><table style=“font-size:9pt;font-family:Gulim字体;\" cellpadding=\"0\" cellspacing=\"0\" ><tr>\n" + " <td height=“23” style=“font-size:11pt;padding-left:0px;“><b>1. 考勤申请人信息</b></td></tr>....................]]></BODYTEXT>\n" + " <DRAFTERUSERID></DRAFTERUSERID>\n" + " <DRAFTEREMPNO>20110007</DRAFTEREMPNO>\n" + " <ISPUBLIC>Y</ISPUBLIC>\n" + " <FORMNAME>工作申请禀议</FORMNAME>\n" + " </DOC>\n" + " <EXTRA>\n" + " <ISTEMPSAVE>N</ISTEMPSAVE>\n" + " <REDRAFT>N</REDRAFT>\n" + " <AUTODRAFT>N</AUTODRAFT>\n" + " <DRAFTSYNC>Y</DRAFTSYNC>\n" + " <PROCESSYNC>N</PROCESSYNC>\n" + " <RETURNSYNC>Y</RETURNSYNC>\n" + " <ISAPRLINE>Y</ISAPRLINE>\n" + " <ISRECIPIENTCC>Y</ISRECIPIENTCC>\n" + " <ISPROPERTY>Y</ISPROPERTY>\n" + " </EXTRA>\n" + " <PROPERTY>\n" + " <SECURITYCODE>200</SECURITYCODE>\n" + " <STORAGEPERIOD>5yr</STORAGEPERIOD>\n" + " <ISEDMS>Y</ISEDMS>\n" + " <DUEDATE></DUEDATE>\n" + " <TAG>근태</TAG>\n" + " <TASKCODE></TASKCODE>\n" + " <SUBCODE></SUBCODE>\n" + " </PROPERTY>\n" + " <APRLINE>\n" + " <APPROVER>\n" + " <USERID></USERID>\n" + " <EMPNO>20061613</EMPNO>\n" + " <DEPTID></DEPTID>\n" + " <APRTYPE>Approve</APRTYPE>\n" + " </APPROVER>\n" + " </APRLINE>\n" + "</CONNROOT>\n" } </script> <body> </body> </html>