Design studio RQ custom script

Sort:
You are not authorized to post a reply.
Author
Messages
Queue
New Member
Posts: 4
New Member

    I have a custom script in Design Studio for a RQ form in Lawson so that when the user clicks on a "Print" button on the form, the script opens a new window containing Requisition information formatted for printing.

    For some reason if I don't have the following line of code, the new window will open, but it will not display any of the information.

    // Ignore write line
    //    document.write("");

    //Create New Popup Window
        var vPrintWindow = window.open("","","scrollbars=yes,width=730,height=500,top=0,left=0");
        var vDocument = vPrintWindow.document;

    If I include the write line code, the new window opens, displays all the Requisition information, however it clears the form window and writes out "" to the browser window, the user then has to click the "back" button to return to the RQ form and  re-inquire on the Req to get that information back, which is bad.

    // write line included
        document.write("");

    //Create New Popup Window
        var vPrintWindow = window.open("","","scrollbars=yes,width=730,height=500,top=0,left=0");
        var vDocument = vPrintWindow.document;

    Any thoughts on why this might be happening?  I thought perhaps the browser was having trouble referencing between the parent window and the new open window.  However when I tried something like

    var ParentWindow = window.self;
    var ParentDocument = ParentWindow.document;

    it didn't seem to make a difference.

    You are not authorized to post a reply.