Discussion
Capgemini
US
Last activity: 10 Jun 2016 5:52 EDT
Where to add Jquery files in Harness
Hello I am using PRPC V 7.1.6 and need some advice to add Jquery files in my UI.
As Pega harness supported JS files under script/file tab but I am unsure where to add Jquery files/APIs.
Please guide if anybody gone through the same implementation.
thanks
sharad
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi Sharad,
Yes, you would typically add a js library in the list of scripts under the Scripts & styles tab of the harness. You could include it either as a standalone js file or as a bundle.
Just so you know, Pega 7 already includes jQuery, and it is included in every harness. It is included using a static bundle pzpega_ui_jquery. Check the version of jQuery included in that bundle for the version of Pega you are on.
Regards,
Vinay Kamath
Capgemini
US
Many thanks Vinay,
I added my Jquery files under script tab and added bundle pzpega_ui_jquery as suggested by you.
Now most of the functions are working but when I am trying to call outside domain URL, I am getting access denied error from IE 11.
I have added external URL in to trusted sites and changed other security setting as well but no success.
Do you think - "PRPC is preventing to call other domain URL by enabling cross side scripting"? As the same code with same configuration is working in all standalone applications.
Any help on this is highly appreciated.
regards,
Sharad
Pegasystems Inc.
IN
Hi Sharad,
Could you please elaborate on how you are calling external URLs. I believe you are trying to make some AJAX requests. Cross-domain AJAX requests are in general blocked by browsers, unless you are using a setup like CORS etc. I do not think PRPC does anything to block AJAX requests.
Thanks,
Irfan
Pegasystems Inc.
US
Content Security Policy (CSP) is new in ML6. It provides support for blocking/allowing this kind of behavior. As Irfan states blocking occurs in the browser, even with CSP.
Capgemini
US
Many thanks Irfan and Solom,
Yes I am calling external URLs through AJAX request.
I made security changes in my browser (IE11- (eg. added as trsuted site, enable XSS domain)) and CORs set up has ben done by hosting team.
I also confirm the same code by calling from standalone application, But this behaviour (access denied) is only with PRPC.
And with chrome browser the issue is different---"It returns the 405 status".
Even in PDN doesn't have any work around for this.
Many thanks in advance and any advice on this will help me a lot.
regards,
sharad
Capgemini
US
Thanks issue was from hosting side, they were adding CORS two times.
regards,
Sharad
fusionAIx Technologies
GB
Hi,
I am using PRPC V 7.1.7, in my custom welcome harness i want to add image slider.
looking for options to add jQuery image slider or javascript image slider on layout.
Can any one of you help on the same.
Thanks in advance :-)
Regards,
Yash