PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/16/2019 3:05 PM by  PBL
JavaScript differences between IE 11 and Edge?
 0 Replies
You are not authorized to post a reply.
Author Messages
Basic Member
(23 points)
Basic Member

Send Message:

10/16/2019 3:05 PM

    Using Design Studio, the following JavaScript was added to AP20.1 to retrieve the Requester for a PO.  When run in IE 11 (in default Edge emulation mode) on Windows 7, it runs successfully - the count shows that 1 record was retrieved and the vRequester variable is set to the Requester from the database.  When run in Edge on Windows 10, the count also shows that 1 record was retrieved, but vRequester is always blank.

         var strPDL = portalWnd.oUserProfile.getAttribute("productline");
         var s = https://server + portalWnd.DMEPath;
         s += "?PROD="+strPDL;
         s += "&FILE=POLINESRC";
         s += "&INDEX=PLSSET1";
         s += "&KEY=" + parseInt(CoNbr,10);
         s += "= =";
         s += escape(PONbr);
         s += "&FIELD=REQUESTER";
         s += "&OUT=XML&DELIM=~";
         var sReturn=portalWnd.httpRequest(s);
         var vObjDMEXML = new portalWnd.DataStorage(sReturn);
         var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD");
         var count = vObjDMEXML.document.getElementsByTagName("RECORDS")[0].getAttribute("count");    
         if (count > 0) var vCols = vRecords[0].getElementsByTagName("COL");
         var vRequester = vCols[0];  

    I was told that I should use firstElementChild. instead of .firstChild.  However, I'm struggling to get firstElementChild to work.  Does anyone have an example of use of firstElementChild to extract returned data from a DME call? 

    Thank you

    You are not authorized to post a reply.