Question
JPMC
US
Last activity: 22 Jul 2021 16:23 EDT
Activity called from Java Script is not working on Load Balanced SSO URL
function test(){ var frame=document.getElementById('IFrame'); var ans=frame.contentWindow.GetData(); document.getElementById("Text").value=ans; var oSafeUrl = null; /*var oSafeUrl = new SafeURL("JPMC-FW-CMFW-Work.SaveAnswerFile"); oSafeUrl.put("pzPrimaryPageName","pyWorkPage"); oSafeUrl.put("AnswerFileText",ans); var request = pega.u.d.asyncRequest('GET',oSafeUrl); pega.util.Connect.asyncRequest('GET', oSafeUrl.toURL(),''); var request = pega.util.Connect.asyncRequest('POST', oSafeUrl.toURL()); httpRequestAsynch( oSafeURL.toURL(), null, 50, 100);*/ oSafeUrl = new SafeURL("ClassName.SaveData",getReqURI()); oSafeUrl.put("pzPrimaryPageName","pyWorkPage"); oSafeUrl.put("AnswerFileText",ans); var request = pega.util.Connect.asyncRequest('POST', oSafeUrl.toURL()); alert("iFrame Data Saved"); }
function test(){ var frame=document.getElementById('IFrame'); var ans=frame.contentWindow.GetData(); document.getElementById("Text").value=ans; var oSafeUrl = null; /*var oSafeUrl = new SafeURL("JPMC-FW-CMFW-Work.SaveAnswerFile"); oSafeUrl.put("pzPrimaryPageName","pyWorkPage"); oSafeUrl.put("AnswerFileText",ans); var request = pega.u.d.asyncRequest('GET',oSafeUrl); pega.util.Connect.asyncRequest('GET', oSafeUrl.toURL(),''); var request = pega.util.Connect.asyncRequest('POST', oSafeUrl.toURL()); httpRequestAsynch( oSafeURL.toURL(), null, 50, 100);*/ oSafeUrl = new SafeURL("ClassName.SaveData",getReqURI()); oSafeUrl.put("pzPrimaryPageName","pyWorkPage"); oSafeUrl.put("AnswerFileText",ans); var request = pega.util.Connect.asyncRequest('POST', oSafeUrl.toURL()); alert("iFrame Data Saved"); }
In the above script i tried 3 different methods. First two in the below list are working fine in non-SSO urls. But, on our LB URL which is configured with SSO, the alert is getting displayed but the activity call is not happening and the data is not being saved. Since the SAVE button is on an iFrame window, developer tools is also not working. Please suggest what can be done to make this work.
pega.util.Connect.asyncRequest('POST', oSafeUrl.toURL());
pega.util.Connect.asyncRequest('GET', oSafeUrl.toURL(),'');
httpRequestAsynch( oSafeURL.toURL(), null, 50, 100);