How to trigger javascript in parent window which opens a pdf in iframe after event (didPrint)

My main goal is the following:
1. PHP generates PDF using fpdf <-- OK
2. javascript: PDF opens in an IFRAME <-- OK
3. PDF prints silently using emb java <-- OK
4. After print, call a function in my javascript <-- Problem
I tried window.onload() in java, but this seems to fire once the window is loaded. Means, that the pdf itself is not loaded and hence the print process has not started.
I'm currently exploring to use setAction(didPrint, action) to create a robust trigger -
function AutoPrint($dialog=false)
//Open the print dialog or start printing immediately on the standard printer
$param=($dialog ? 'true' : 'false');
$script="print($param);";
    $script.="setAction('DidPrint', app.alert('test2'))";
$this->IncludeJS($script);
So, this prints and generates the alert box.
But, I'm clueless on how to fire a command to call a function in my java script....
Help is appreciated.

If you are using Forms 9i or Patch 9 and above of 6i you can use Jinitiator 1.3.n With this version of Jinitiator you can submit URLs containing JavaScript commands as well as http:// URLs.
The syntax is web.show_document('javascript:<command>','<target>').
e.g) web.show_document('javascript:history.back();','_self');

Similar Messages

  • How can I maximize the window which opened using web.show_document() ?

    My user complain, everytime they want to print the report it didn't
    show maximize screen,
    How can I maximize the browser or window which opened using web.show_document() ?
    Thank you

    Thank you for replaying,
    I did search in forum, but I only go one about maximize window when calling
    a report (web.show_document). the link :
    Maximize the new opened window
    Frank said to use "Javascript to the Forms", but no futher explanation whow
    to do it ?
    please help, I don;t know javascript.
    Cabe,

  • How to get rid of a window which says: CalendarAgent wants to use the "login" keychain

    How to get rid of a window which says: CalendarAgent wants to use the "login" keychain

    I would get free EasyFind (Spotlight will be a total waste of time), and search for caremefile and caremefile.info. If it comes up with anything, right-click and select move to trash, or just destroy. Since you didn't install anything, shouldn't be necessary to authenticate with the admin password before it will move to trash. Could also click on reveal in finder, which will allow you to see the actual location. Set it up as per the screenshot below.

  • How can I get a small window to open when a link is clicked (AS2)

    Hi i,m developing a HTML site and used one animated flash button(AS2) I want a small sized window to open when a user clicks on a button.
    The window will contain information that i want to display.It dosnt require a normal 800x600 window to open. I just want a 1/4 size of 800x600 etc. Is this possible and if so how.
    I havnt done this before
    Thanks
    Manoj

    HELLO NED,
    I WAS RECEIVING MANY MAILS FROM YOU, BUT I DON'T UNDERSTAND WHY DOESN'T RELATED WITH MY PETITION, I SEND
    TO YOU AGAIN MY QUESTION, AND IF YOU CAN HELP ME I APPRECIATED VERY MUCH LET ME KNOW.
    THIS IS MY QUESTION....."ABOUT DATAGRID AS3
    Hello Ned, I appreciate very much your soon answer, I believe you have understand me, but how can I do that? could you give some help? This is part of the code and this is the function that I use
    var url: String = "xmls/rests.xml";
    var req:URLRequest = new URLRequest(url);
    var myLoader:URLLoader = new URLLoader();
    myLoader.addEventListener(Event.COMPLETE, completeHandler);
    myLoader.load(req);
    function completHandler(event:Event):void {
           var myLoader:URLLoader = event.currentTarget as URLLoader;
           var xmlDP:XML = new XML (myLoader.data);
           XML.ignoreWhitespace = true;
           dp = new DataProvider(xmlDP);
           dp = sortOn("name", Array.CASEINSENSITIVE);
           dDg.dataProvider = dp;
           aDg.addEventListener(Event.CHANGE, changeHandler);
           function changeHandler(event:Event): void {
                var thisItem:Object = eve.target.selectedItem;
                descripTa.text = thisItem.description;
                aUI.source = (thisItem.image);
                preloader_mc.visible = true;
    My intention is that when a button from a main (swf) loads the swf it displayed the first selected item with a image (UILoader) and the description (TextArea)
    Thanks in advance Ned
    Joselyn             .................."
    THANKS AGAIN NED
    REGARDS
    JOSELYN
    Date: Thu, 13 Oct 2011 07:49:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I get a small window to open when a link is clicked (AS2)
    Re: How can I get a small window to open when a link is clicked (AS2) created by Ned Murphy in Flash Pro - General - View the full discussion
    Look at the Methods section and choose whichever suits your needs, the first one listed does not.
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3969302#3969302
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3969302#3969302. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Flash Pro - General by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How do I disable an attack site which opens when I launch my browser, I'm using a Mac OS 10.6.4?

    How do I disable an attack site which opens behind my home page whenever I launch my browser? I'm on a Mac, OS 10.6.4
    == URL of affected sites ==
    http://www.therugged.com

    '''Restore Default Home Page'''
    1. On the menu bar, located on top of Firefox, select Tools | Preferences
    2. Confirm you are in the '''General Panel'''
    3. Click '''Restore to Default'''
    4. Finally, click '''OK'''

  • Pass URL parameters to parent window, which is not in VC

    Hi,
    I developed a web application which is calling a VC iView in a new browser window, now I have the problem that I have to pass back URL parameters to the parent window. Is there any possibility to use JavaScript or is there some other solution?
    Thanks fpr your help.
    Kind regards,
    Timo

    Hi Mario,
    thanks a lot for your answer. If I understand correctly your solution works only if the other web application in the parent window is also located in the portal, unfortunately my web application is outside the portal.
    Is there a solution for this, or should I look for something else than using Visual Composer?
    Kind regards,
    Timo

  • How can I set the finder window to open the same way every time?

    Everytime I open Finder it goes back to it's default view which is just too small, but I want to set the finder columns and window so that they open the same exact way every single time. I'm tired of resizing everything.
    Currently I have to resize every window and column everytime and I think my work is much slower then when I was on Windows because of it.
    Is there a setting, script, file, patch, anything, is there absolutely anything I can do to actually control the Finder views and make them adjust to MY criteria and stay that way...

    That is a big negative. That does absolutely nothing other then close my window, next time the finder window is opened then the column widths are small again.
    In Windows Explorer all your windows are customizable, how do I do this with Finder?

  • How do I get all Finder windows to open in spatial view?

    How do I get all Finder windows without special view options set to open in the 'spatial' mode (without the toobar or sidebar)? The ones I specifically change stay that way, but I want all new and old folders to be like that too.

    That's called the simple Finder mode. You would need to configure that as part of Parental Controls in the Accounts preferences. To make any Finder window appear that way jut click on the gadget in the top right corner of the Finder window.

  • How to avoid the annoying little window that opens when I go to close a file?

    When I put my cursor near the x of a file tab to close a file, a little window opens over the x and I have to wait for it to dissappear before
    I can click on the x to close the file. The window that opens has the exact same text as the folder tab and seems worse than useless. Is there a way to turn it off?

    It should be real easy to install the latest ATI driver for the latest ATI mobility video card but that hasn't been the case with those with my computer. Computer stuff is never as easy for my as I think it should be. I'm probably and excellent candidate for Apple computers but I'm too cheap and old to switch.
    My computer is Alienware's (Dell bought Alienware a couple of years ago.) latest and biggest, m18x, and it holds two ATI 6970m GPU's. There is a real good forum of users of this computer and many have problems installing video card drivers. That is why I wanted to leave well enough alone but some say the latest drivers perform better in games so I gave it a try. My first try was installing Dells recommended latest driver for the video cards in my computer. They installed but my computer refused to use them and it hinted that it didn't like the signature. I tried for a while to get it to work but gave up and went to a site recommended by one of the users in the forum and it downloaded fine and is working.
    dt

  • Can I create a pdf with clickable links which open new pdfs?

    Hi,
    My client now wants me to create pdf with links to open new pdfs (in an offline mode). He wants to put all the content onto memory sticks to hand out at a conference.
    I have suggested the alternative of links which redirect to other pages within the same pdf, but if I could create one which open whole new pages or documents this would be really smart.
    Many thanks,
    Sam

    When you create the links, use "Go to a page view" type, as opposed to "Open a file". This allows you to create links that will open another PDF to a particular page and view (zoom and position).

  • How to hide prompts panel for WebI documents opened in PDF via openDocument

    I am linking to a WebI document via openDocument call with sOutputFormat=P. The report opens in PDF format but within another browser window with top panel and left prompts panel.  I tried to set different Web Intelligence Interactive settings in CMC to hide the left prompts panel but to no avail.  We are linking to this WebI report from an Xcelsius dashboard via openDocument and are passing parameters so that the user doesn't have to interact with the report.  Once the results are displayed, user should not be allowed to either Refresh the report or see the parameter panel in the left pane.  Is this possible either via CMC security settings or viewer customization?

    Thanks, posted. The forum was a bit hard to find

  • How to trigger a hotsync from windows shortcut or on window start-up?

    The subject says it all, can we trigger a hotsync using a shortcut command or via a startup application? For the record, I have and use bluetooth for wireless sync.
    I am running Windows XP
    Post relates to: Treo 650 (Unlocked GSM)

    I think the OP wants to trigger an automatic Hotsync from the computer.
    I don't know of any way to do this...
    WyreNut
    Post relates to: Centro (AT&T)
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How to call javascript file in windows?

    I developed javascript for automated pdf files. But i don't know how to call that javascript file from outside of acrobat. Kindly advice me the various way to use that script. This is for acrobat 8.0.

    You can place Acrobat JavaScripts in various form elements, document actions, documents, and the application folder or user application folder. See the Acrobat JavaScript API Reference and Guide fo rmore information, http://www.adobe.com/devnet/acrobat/javascript.html .
    From within Acrobat's JavaScript's debugging console, one can use the following code to locate the JavaScript folders used by Acrobat/Reader:
    function JSInfo() {
    /* define function to report JS information */
    // some basic system information
    console.println(app.viewerType + ' ' + app.viewerVersion + ' is running on ' + app.platform);
    // user level script folder
    try {
    var userJS = 'User level JS folder: ' + app.getPath("user","javascript");
    } catch(e) {
    var userJS = "User has not defined use JS folder level scripts";
    console.println(userJS);
    // application level script folder
    try {
    var appJS = 'Application level JS folder: ' + app.getPath("app","javascript");
    } catch(e) {
    var appJS = "There are no defined application level JS folder level scripts";
    console.println(appJS);
    return;
    } // end of JSInfo function
    JSInfo(); // call the function

  • How to delete a folder in windows , which i was created through SAP

    Hi ,
    First I was created one folder in windows and through SAP application I downloaded some file into that. After closing all programs(Even SAP LOG off ) also.  Now i want to delete that folder.
    While deleting it showing error as some other program file or close that program.
    That file only possible to delete throgh again F$_FileName FM.
    plz give solution to delete that file from windows itself.

    hi,
    Try to restart your pc then delete the file you want to delete.
    I hope it helps.

  • After opening Firefox, how do I stop every new window I open from having old tabs?

    Whenever I start Firefox, it opens a window with tabs I used from a previous session, which is what I want since I set it on Tools > Options > When Firefox starts. However, whenever I open new windows after I have opened Firefox, it always opens four tabs along with my homepage. I tried deleting the four tabs from history then opening a new window again, but it still opens five tabs in the new window. This started around last week. And I don't think I did anything different. I was just surfing the net as usual.

    Check the home page setting.
    * [[How to set the home page]] - Firefox supports multiple home pages separated by '|' symbols
    See also:
    * [[Preferences are not saved]]

Maybe you are looking for

  • HP Smart Web Printing is NOT WORKING....UGH!

    When I click the select button nothing happens. Everything freezes. IE stops responding, I can't close, open, right click, left click.....nothing. I tried several times and each time I had to end the task in Task Manager. I want to uninstalling then

  • Drilldown malfunction

    Hi all, I am not able to drilldown to lowest level of my dimension. There is no actually error message and only thing that remains forever on the screen is " Searching... To cancel, click here.". I have found connection between number of used filters

  • Issue in Cheque Printing using Laser Printer

    Hi,     There is a requirement wherein cheque needs to be printed from F-58 using Laser Printer.I have created the custom page format for Cheque printing .Attached it to the custom device type that i have created(Copy of Device type HPLJIIID).Aslo i

  • After upgrading my Macbook Air to OS Yosemite it doesn't recognise the 3G USB modem which was working previously. Any ideas

    After upgrading my Macbook Air to OS Yosemite it doesn't recognise the 3G USB modem which was working previously. Any ideas?

  • LV RT - String to double conversion

    Hello, I want to convert a string to a double on my Real Time device (PXI-8101. When I use the "scan value" or "Fract/Exp String To Number Function" VI the numbers after comma dissapear. This does not happen on the Host (PC).  So for example on the h