tag:blogger.com,1999:blog-34020393.post115769217958913249..comments2024-03-27T10:59:38.307-07:00Comments on Jim's PeopleSoft Journal: AJAX and PeopleSoftJim Marionhttp://www.blogger.com/profile/12995110203807924786noreply@blogger.comBlogger42125tag:blogger.com,1999:blog-34020393.post-16114292265814721952016-09-22T09:46:48.594-07:002016-09-22T09:46:48.594-07:00@Giridharan,
If your code were in an iScript inst...@Giridharan,<br /><br />If your code were in an iScript instead of an HTML Area and you were on 8.5+ PeopleTools, then I would say your code looks reasonable. I would put some console.log statements in there to see what parts are or are NOT executing. Since you have an HTML Area, however, I'm suspecting this code is in a PeopleSoft page. In that case, the $(document).ready may be a problem, since the JavaScript itself is ajax'd into 8.5+ pages, it may never execute. Try putting some console.log statements in your script to see if you can see what is and isn't executing.<br /><br />Another problem could be CORS and cross site scripting. If your target doesn't support CORS, then your browser will block the cross domain Ajax request.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-33351228266143604932016-09-22T01:39:19.668-07:002016-09-22T01:39:19.668-07:00Hi Jim,
I am trying to get the response values fr...Hi Jim,<br /><br />I am trying to get the response values from a third party url using AJAX. The return value will the status of 0 for success and 1 for failure. Based on the code, i need to redirect to another PS page.<br /><br />Steps followed.<br /><br />1. Created a HTML Area<br />2. Created a HTML object and wrote the code as below.However, I am unable to get the url. <br />3. And in the page activate, wrote code to assign the value of html object to HTML area using a field.<br /><br />html<br />script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" <br />$(document).ready(function(){<br />$.ajax({<br />url : "thirdpartyurl will be passed here",<br />type: "POST",<br />data :"the query string for the url",<br /><br />success:function(response){<br />alert(response);<br />},<br />error:function(e){<br />alert(e);<br />}<br /><br />});//ajax end<br />});//function end<br /><br />script<br />html<br /><br />Please provide your advise how to proceed further. Is it the right approach to follow?Anonymoushttps://www.blogger.com/profile/10685220344245630851noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-89206739009505819172015-01-29T06:58:29.211-08:002015-01-29T06:58:29.211-08:00@Ramky, monkey patch net2.ContentLoader to impleme...@Ramky, monkey patch net2.ContentLoader to implement you custom logging. Just be sure to pass everything through to the delivered net2.ContentLoader.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-9793355675835038562015-01-28T23:20:27.904-08:002015-01-28T23:20:27.904-08:00Hi Jim,
I have a requirement to capture pag...Hi Jim,<br /> I have a requirement to capture page load time of peoplesoft pages. So, I use a html area on a page and Javascript with some functions to calculate the page load time. The javascript depends on OnLoad event of a page so as to invoke the javascript functions. But when you sign in for the first time, OnLoad event gets fired and javascript function works. When you traverse to other peoplesoft pages and navigate back to original page, the OnLoad event does not get fired. I think this may be due to Partial refresh methodology which peoplesoft uses. Is there any alternative to achieve this or force OnLoad event on a page?<br /><br />Thanks<br />RamkyAnonymoushttps://www.blogger.com/profile/18284728248134456102noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-29116319128950333002014-11-12T09:36:09.973-08:002014-11-12T09:36:09.973-08:00@Manish, I missed the requirement for POST instead...@Manish, I missed the requirement for POST instead of GET. In this case, you would define a synchronous Service Operation with request and response message definitions. You can use the Documents module to model your data shape or use IB_GENERIC if you just want raw XML without regard for structure. Then you can populate the outbound request message and read the synchronous inbound response.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-91857200286057827052014-11-12T08:43:49.129-08:002014-11-12T08:43:49.129-08:00Thank you for your response Jim. This is a synchro...Thank you for your response Jim. This is a synchronous post.<br /><br />I want to post the following XML string <br /><br /><br /><br />Manish<br />Satija<br /><br /><br /><br />on to http://saltlake.testing.com:8080/spf/register (this is non Peoplesoft system)<br /><br />and the response that I get by Posting(used SOAPUI to get the response) is <br /><br /><br /><br /> saltlake.testing.com<br /> /spf/validate-token/df3f2739e33e3b3e6d37a43ebf9d088b<br /> 8080<br /> <br /> true<br /> df3f2739e33e3b3e6d37a43ebf9d088b<br /><br /><br />How do I post this XML using ConnectorRequestURL function? Please advice .testhttps://www.blogger.com/profile/04611107833199921533noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-56291181003007216372014-11-11T15:11:51.882-08:002014-11-11T15:11:51.882-08:00@Manish, is this synchronous or asynchronous? If i...@Manish, is this synchronous or asynchronous? If it is Synchronous, then ConnectorRequestURL or standard service operation metadata will allow you to send a request and read the response. If it is asynchronous, however, then the 3rd party is actually calling a PeopleSoft web service to send you a response. That is different. Asynchronous requires metadata for the inbound service operation as well as potential network configurations to allow the 3rd party to connect to PeopleSoft (if outside the network).Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-9733918266660740762014-11-11T15:08:26.823-08:002014-11-11T15:08:26.823-08:00As I will be posting XML(to third party) and will ...As I will be posting XML(to third party) and will get a XML response(from third party). I don't think ConnectorRequestURL will work. As far as Integration Broker goes. Do you have any pointers or some documentation where it is explained ? testhttps://www.blogger.com/profile/04611107833199921533noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-58738065199582872172014-11-11T14:39:31.231-08:002014-11-11T14:39:31.231-08:00@Manish, there are a couple of ways. If this is al...@Manish, there are a couple of ways. If this is all client side, then yes, you can use Ajax, but then I would think there would be cross domain problems. The "recommended" approach is to use Integration Broker. You can use %IntBroker.ConnectorRequestURL if you don't want to create all the service operation metadata.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-9937801066760359982014-11-11T14:18:05.868-08:002014-11-11T14:18:05.868-08:00Jim,
I am trying to post XML data on an external s...Jim,<br />I am trying to post XML data on an external site and that site would send a response back in form of XML. <br />How do I do it. I can post the XML using Iscript & AJAX, Not sure how to get the XML response back. Any help is appreciated.<br /><br />Thanks<br />Manishtesthttps://www.blogger.com/profile/04611107833199921533noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-74656910762204797532012-06-12T16:44:40.702-07:002012-06-12T16:44:40.702-07:00@Arul, the behavior you are seeing is unfortunate,...@Arul, the behavior you are seeing is unfortunate, but accurate. That is the way it works. If you look at the HTTP response for each Ajax request, you will see that all field values are included in the response -- even fields that didn't change. This is how PeopleTools is able to update related display fields and other fields based on FieldChange PeopleCode, etc.<br /><br />If your page HTML Area is static rather than bound to a derived/work record, then I don't know if it will update on every event. If you can make it static, then try that. If the data has to come from the database and be related to the current transaction, then can it come from outside the component buffer? For example, could you use Ajax and an iScript to load it in from a static HTML Area? Test the static HTML area first, though just to make sure it doesn't reload. This isn't the best solution, but it might be a solution.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-46827024509127147682012-06-12T16:01:10.537-07:002012-06-12T16:01:10.537-07:00Hi Jim,
We have an issue with out page on the sam...Hi Jim,<br /><br />We have an issue with out page on the same line. We are displaying a HTML link using iframe in a HTML area which is located in the peoplesoft page. The HTML area is getting refreshed on all the fieldchage i do in the peoplesoft page. Is there a way to avoid this. Basically once i load the HTML page into the PS page, It should get refreshed. <br /><br />Thanks,<br />Arul.psg.arulhttps://www.blogger.com/profile/04045479430206446278noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-51365368552475511792011-12-27T14:08:31.639-08:002011-12-27T14:08:31.639-08:00@Poornima, I do not have much to offer you. It sho...@Poornima, I do not have much to offer you. It should be relatively painless. Will you allow instructors/administrators to configure the seating arrangement online? I would probably use <a href="http://jqueryui.com/demos/sortable/#display-grid" rel="nofollow">jquery-ui sortables</a> in a grid with a list of students on either the right or left, and then allow the instructor/administrator to drop the students from the list onto the grid. I would use Ajax and an iScript for persistence.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-7034602651979126962011-12-21T23:18:09.054-08:002011-12-21T23:18:09.054-08:00Hi Jim,
I need to work on a solution, where a cha...Hi Jim,<br /><br />I need to work on a solution, where a chart for seating arrangement of students in a classroom, has to be done for Campus Solutions Project. Can you please suggest me as to how should I progress in this.<br /><br />links as to how the seating chart should look <br />1).http://www.asyluminc.com/mb_manual/MK-seat.htm<br /><br />2).http://www.thecanadianteacher.com/tools2/seating%20plan/seatingplan.html<br /><br /><br />Thanks,<br />PoornimaPoornimahttps://www.blogger.com/profile/00419442669803698282noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-38607679805030298372011-09-21T13:18:29.623-07:002011-09-21T13:18:29.623-07:00@Eliando, @Unknown,
There is another possible cau...@Eliando, @Unknown,<br /><br />There is another possible cause for this. I haven't tested your exact scenario, but I have another scenario involving PT_ISCROSSDOMAIN. PT_ISCROSSDOMAIN was written for IE. PT_ISCROSSDOMAIN_NS6 was written for Mozilla. It appears that the panel processor inserts PT_ISCROSSDOMAIN into IE, but both into mozilla browsers. The result is that the IE version often gets processed last, resulting in IE code trying to run on mozilla based browsers. I put in a bug for this when I discovered it. I am not sure the current status. My work-around was to modify PT_ISCROSSDOMAIN to merge both the NS6 and the IE versions into the same file. I don't recommend customers try this, but you have to do what you have to do, and I'll leave that decision up to you.<br /><br />I suggest you open a case with support. I suspect there is a patch available for this issue. I didn't find anything in support.oracle.com, but a support technician should be able to point you in the right direction.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-17493431543087941682011-09-21T11:38:32.035-07:002011-09-21T11:38:32.035-07:00Hi Jim,
I also have the same problem with people...Hi Jim, <br /><br />I also have the same problem with peoplesoft page transaction does not work in iframe.<br /><br />I use PSC URL and it does not work only in Firefox.<br /><br />The issue that I was getting is permission denied to get property Window.document and it was referring to PS_ISCROSSDOMAIN_1.js.<br /><br />Any clue or lead how to solve this problem is very appreciated.<br /><br />Thanks in advance :)Eliando K. Putrahttps://www.blogger.com/profile/09008865434831040995noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-73162302704829062362011-09-21T11:38:06.833-07:002011-09-21T11:38:06.833-07:00Hi Jim,
I also have the same problem with people...Hi Jim, <br /><br />I also have the same problem with peoplesoft page transaction does not work in iframe.<br /><br />I use PSC URL and it does not work only in Firefox.<br /><br />The issue that I was getting is permission denied to get property Window.document and it was referring to PS_ISCROSSDOMAIN_1.js.<br /><br />Any clue or lead how to solve this problem is very appreciated.<br /><br />Thanks in advance :)Eliando K. Putrahttps://www.blogger.com/profile/09008865434831040995noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-5068651353595988732011-08-19T17:06:22.936-07:002011-08-19T17:06:22.936-07:00@Unknown, are you using the PSP or the PSC URL? Ar...@Unknown, are you using the PSP or the PSC URL? Are you saying the transactions don't work when in an iframe? Are you using Firefox or IE? If firefox, then download firebug and open the console before trying a link. I suspect that the PeopleSoft pages are trying to call the checkAnyFrameChanged, etc save functions before following a link. This can either throw an undefined or a cross domain error.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-90896609998372530832011-08-16T22:48:21.161-07:002011-08-16T22:48:21.161-07:00Hi Jim,
We want to display the peoplesoft pages i...Hi Jim,<br /><br />We want to display the peoplesoft pages in one of the Website via Iframe. The problem is whenever we try to open the webpage, the peoplesoft page inside the iframe displays correctly but none of the link on the iframe works. <br /><br />Could you please suggestUnknownhttps://www.blogger.com/profile/01726000127426671030noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-83103720603105438042010-06-19T22:27:05.835-07:002010-06-19T22:27:05.835-07:00@Raj, Asynchronous implies a callback mechanism. Y...@Raj, Asynchronous implies a callback mechanism. You can send a message from a component, but there is no callback into the component from subscription PeopleCode. Using Ajax, you can make asynchronous calls to integration broker and process the response, but it won't directly update the component buffer. On response, you can update values on the page.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-59821778116924924392010-06-19T14:41:08.298-07:002010-06-19T14:41:08.298-07:00Can we update asynchronous inbound response to com...Can we update asynchronous inbound response to component buffer ?Lazy Donkeyhttps://www.blogger.com/profile/09307497878293074830noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-19841983741305407382009-08-16T23:08:46.272-07:002009-08-16T23:08:46.272-07:00@Hemant, I show how to do something very similar i...@Hemant, I show how to do something very similar in chapter 6 of my <a href="http://jjmpsj.blogspot.com/2009/07/new-peopletools-book.html" rel="nofollow">PeopleSoft PeopleTools Tips and Techniques</a> book. Unfortunately, I'm not finished writing and it isn't scheduled to hit the shelves until July, 2010. While you wait, take a look at <a href="http://campus-codemonkeys.blogspot.com/search?q=jquery" rel="nofollow">http://campus-codemonkeys.blogspot.com/search?q=jquery</a>.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-62292863310132592502009-08-16T20:42:55.995-07:002009-08-16T20:42:55.995-07:00thanks again for your response jim.
it really woul...thanks again for your response jim.<br />it really would be great if u can send some sample code with an example which i can try out. Earlier i even tried to use other event handlers without much success.<br /><br />Really appreciate ur help & guidance.Hemant Mamtorahttps://www.blogger.com/profile/02070757158306533836noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-86210170064927902232009-07-27T12:02:49.707-07:002009-07-27T12:02:49.707-07:00@Hemant, rather than setting window.onload, which ...@Hemant, rather than setting window.onload, which may overwrite any PeopleTools page load handler, use the addEvent/attachEvent technique. Chris Heller wrote about using this with PeopleSoft in his post <a href="http://blog.greysparling.com/2006/02/enhancing-usability-of-peoplesoft.html" rel="nofollow">Enhancing the Usability of PeopleSoft Applications</a>. Rather than use Chris's addEvent routine, I prefer to use jQuery to attach event handlers because it allows me to do it with one line of code. To add an onload handler with jQuery, you just write $(document).ready(function() {...}); If you are just trying to see custom JavaScript execute, then you don't need to wait for the entire document to load.<br /><br />Unfortunately, there isn't a lot of "HOWTO" information out there on PeopleSoft and Ajax. I'm hoping to change this by writing a couple hundred pages about PeopleTools, JavaScript, and Ajax in my new book <a href="http://mhprofessional.com/product.php?isbn=0071664939" rel="nofollow">PeopleSoft PeopleTools Tips & Techniques</a>Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-23771024707400557852009-07-24T00:02:30.908-07:002009-07-24T00:02:30.908-07:00script language='javascript'
function Test...script language='javascript'<br />function Testing()<br />{<br />alert("I am here");<br />}<br />window.onload = Testing;<br />/script<br /><br />when I tried to open the page it showed the alert, but the page status still showing blinking Processing message continuosly.<br />Please help to complete this initial step. <br /><br />Thanks in advanceHemant Mamtorahttps://www.blogger.com/profile/02070757158306533836noreply@blogger.com