Friday, July 6, 2012

Error on Javascript in PeopleTools 8.52: "hAction_win0 is not defined"

Below code may not work from PeopleTools 8.52. But this will work on below version of tools release (i.e. 8.50, 8.51).
hAction_win0(document.win0,pageFldName,0,0,inlabel,false,true); 



Reason:


"hAction_win0" is no longer used in PeopleTools 8.52.


Solution:


"hAction_win0" can be replaced with "submitAction_win0" for 8.52 PeopleTools.


Sample code:

submitAction_win0(document.%FormName,pageFldName,0,0,inlabel,false,true); 

13 comments:

  1. Hi Pawan,

    We are on tool 8.51. We have a strange issue. Everyone except one employee, can view their paycheck. For this employee, it gives a error on page, where it displays the javascript:hAction_win0(document.win0,'PAY_END_DT_ALT$0',0,0,'2012-07-19',false,true);
    Could you think of any thing that needs to be fixed. why it happens just for one employee. And it only happens in internet explorer, it works fine in Firefox. Any ideas will be highly appreciated.

    ReplyDelete
  2. At what version of IE is used..? Try to use higher version of IE (Preferable IE-8). IE-6 is not supported in PeopleTools 8.51.

    ReplyDelete
  3. Hi Pawan

    We are using IFrame to host peoplesoft site for payment information. We are getting error like
    Uncaught TypeError: Cannot read property 'win0' of undefined PT_AJAX_NET_win0_1.js:494
    net.ContentLoader.processXML PT_AJAX_NET_win0_1.js:494
    net.ContentLoader.onReadyState PT_AJAX_NET_win0_1.js:287
    req.onreadystatechange PT_AJAX_NET_win0_1.js:187


    It was working with older version of people..

    ReplyDelete
  4. You can use Firebug plugin in Firefox browser to debug this.

    ReplyDelete
  5. Error: Permission denied to access property 'document'

    if (typeof(objFrame.document)!="object")

    FROM PT_ISCROSSDOMAIN_1.js

    here is the source code for js


    function isCrossDomain(objFrame)
    {
    if (!objFrame) return false;
    if (typeof(objFrame.document)!="object")
    return true;
    var props = objFrame.document.props;
    if (typeof(props) != "object")
    return true;
    if (props.domain != document.domain)
    return true;
    return false;
    }
    function isCrossDomainTop()
    {
    var objFrame;
    for (var j=0;j<top.frames.length;j++)
    {
    objFrame = top.frames[j];
    if (isCrossDomain(objFrame))
    return true;
    if (objFrame.frames)
    {
    for (var k=0;k<objFrame.frames.length;k++)
    {
    if (isCrossDomain(objFrame.frames[k]))
    return true;
    }
    }
    }
    return false;
    }

    ReplyDelete
  6. @Kamal: PT_ISCROSSDOMAINNS6 should be loaded for FF and PT_ISCROSSDOMAIN is written for IE. I suggest you to open a SR with oracle support.

    ReplyDelete
  7. Hi,

    How are you? I need your help on pagiantion on peoplesoft page (below the grid)


    Current Functionality : Page has a grid and set the occurs level as 5. If they click on the "Next" Icon then next set of 5 rows will be disaplyed.

    New Functionality: Pagination need to impliment.For that I analysed the "Next" Icon functionality of the grid property. It is calling the below logic.
    --------------------
    class='PSHYPERLINK' name='MY_PAGE_FIELD_NAME$hdown$0' id=MY_PAGE_FIELD_NAME$hdown$0' tabindex='29' href="javascript:submitAction_win0(document.win0,'MY_PAGE_FIELD_NAME$hdown$0')
    --------------------

    When page loads by default 1st 5 set of rows are disaplying. Then if user clicks on the 5 button(Pagination button) then i will check the difference between previous and currnet pagination buttons and that many times i will trigger the above code.

    For me i am not getting how to trigger the above code.

    So please help me to trigger the above code when we click on the pagiantion button.

    For pagination buttons i am taking peoplesoft push buttons.

    Thanks for your support.

    Lakshminarayana

    ReplyDelete
  8. Y don't u use a push button and select destination as "Scroll Action". and provide appropriate Action Type and Related Control..

    ReplyDelete
  9. Thanks Pawan! That fixed our problems. You just saved me a lot of time!!!

    ReplyDelete
  10. Pawan - Here were are upgrading PeopleTool 8.52.00 version and add attachment is not working and page hangs and it just spins all the time.

    I see you mentioned this solution, can you help me where to change this code?

    Reason:


    "hAction_win0" is no longer used in PeopleTools 8.52.


    Solution:


    "hAction_win0" can be replaced with "submitAction_win0" for 8.52 PeopleTools.


    Sample code:

    submitAction_win0(document.%FormName,pageFldName,0,0,inlabel,false,true);

    ReplyDelete
  11. Hi Raj.. I don't think this is an issue with addattachment function.

    ReplyDelete
  12. I am having a problem while trying to click "Next" on a hyperlink using Selenium Webdriver. I tried using CssSelector as well as XPath and nothing seem to work. Its not looping as expected. Please any one guide to crawl all page jobs.

    I have posted my spider code and output from this link : http://ge.tt/4nr7Q372

    Platform : Scrapy + selenium + Python

    Please let me know is there any correction needed?

    Note : I have posted my link : http://stackoverflow.com/questions/27540192/unable-to-click-on-the-next-hyper-link-javascriptsubmitaction-win0

    ReplyDelete
  13. Hi Pawan ,

    Could you help me out , where to change this code?

    ReplyDelete