Njawin and getting a handle to IE popup windows

I am using njawin to generate mshtml and shdocvw in order to control Internet
Explorer. I can get IE to come up and I can click links, set inputs, etc. But when I click a link the pops up a new window how do I get a handle to it? I am using the event NewWindow2 which gets called, but there is no reference to the new window passed in.
Njawin generated Java:
public void NewWindow2(Object o, ObjectRef objectRef, ObjectRef objectRef1) throws COMException
MSHTML interface:
void NewWindow2(
IDispatch **&ppDisp,
VARIANT_BOOL *&Cancel
Please advise� thanks,
Brian

I little more info on this one...
public void NewWindow2(Object o, ObjectRef objectRef, ObjectRef objectRef1) throws COMException
When the NewWindow2 event is called, a reference to the original parent IWebBrowser2 is passed in the first parameter "Object o". And it looks like the new popup IWebBrowser2 should be passed in the second parameter "ObjectRef objectRef", but unfortunately it's getRef method returns null. The third parameter returns boolean which is correct according to the mshtml interface definition.
Does the code njawin generate not support these types of events properly? What can I do to make it work?
Thanks,
Brian

Similar Messages

  • Message (of message manager) gets lost by opening a popup window

    Hi all,
    On behalf of a better error/exception handling, I would like to show the stacktrace in a popup window, that means, if the application reports an error message (through the message manager in the view controller), the user (administrator, developer) can optionally click a link (LinkToAction => opening a modal window) to see the stacktrace in a separat popup window.
    Unfortunately if the popup window now gets displayed, the error message on the main view (background of the popup window) will be cleared, so this - for the common user more readable - information is not anymore displayed, also when the popup will be cleared.
    Of course, I could backup the error message in a context value and redisplay it after closing the popup window, but I suppose that's not a very cool solution...
    Other any good ideas?
    Thanks,
    Stefan

    Hi Stefan
    Usually showing a stack-trace to the end-user of your application is not so helpful as might appear. My experience shows that the information is too technical for the end-user and does not help him/her to resolve the issue/problem. It's better to display error messages pointing him to some solution or directions that he might do in order to fix the error.
    If you still want to show a stack-trace I'd advise the following. You have to prepare the UI control with the stack-trace in the same server response (round trip) which shows the message manager's messages. The messages will not disappear until a client sends a new request to the server. When you open the popup such request definitely takes place.
    Maybe try to display the stack-trace in the bottom of the screen so user have to scroll down a little bit to show the trace.
    Or maybe Tray control will help in the case. Try to put the trace in a text view and put the view in a tray. Then user has to expand the tray to see the trace. But do not assign any event handlers to the tray to avoid additional request to the server while it's expanding.
    BR, Sergei

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Start Excel and get workbook handle

    Hi,
    I would like to build a launcher which would start Excel 2013, and then register my xll file using "RegisterXLL".
    One of my prototypes is starting the process, using the path to Excel.exe, and then it gets the window handle (the ultimate goal is to reach the COM application object in order to invoke RegisterXLL).
    Thus I must find the child window whose name is "EXCEL7". I can get the main window handle from the process I have created, that's fine. But in order to get the child handle, I have tried 2 functions : EnumChildWindows and FindWindowExA,
    which both are part of "user32.dll".
    Unfortunately, I have to wait for a certain amount of time before calling these functions, otherwise they don't work. Basically, I wait for 1 or 2 seconds, then I call EnumChildWindows or FindWindowExA, and it works fine.
    But if I don't wait, then EnumChildWindows does not enumerate anything, and FindWindowExA return 0. And once I have called one of them, I can retry even 10 seconds later, they will still not work.
    Then I have no idea what I must wait for, or how long I must wait.
    I would gratefully appreciate some help !
    Thanks
    Ron

    Going back to my first approach using Windows apis, I noticed that if I refresh the process after a while, then I get a different value for the MainWindowHandle. From that value, I can do the work. 
    Then here is my final solution :
    1) Get the MainWindowHandle
    2) Enumerate the child windows (using FindWindowExA or EnumChildWindows)
    3) If the child window called "EXCEL7" is not found then refresh the process and go to 1). If the window was found then continue.
    It works !
    ProcessStartInfo info = new ProcessStartInfo(excelPath, "/x")
    UseShellExecute = false,
    CreateNoWindow = true
    Process process = new Process
    StartInfo = info
    process.Start();
    IntPtr hWndChild = IntPtr.Zero;
    do
    process.WaitForInputIdle();
    StringBuilder cname = new StringBuilder(256);
    EnumChildWindows(process.MainWindowHandle, delegate(IntPtr hWndEnum, IntPtr param)
    GetClassNameW(hWndEnum, cname, cname.Capacity);
    if (cname.ToString() == "EXCEL7")
    hWndChild = hWndEnum;
    return false;
    return true;
    }, IntPtr.Zero);
    if (hWndChild == IntPtr.Zero)
    Thread.Sleep(100);
    process.Refresh();
    } while (hWndChild == IntPtr.Zero);
    IntPtr pUnk = IntPtr.Zero;
    int hr = AccessibleObjectFromWindow(hWndChild, OBJID_NATIVEOM, IID_IDispatchBytes, ref pUnk);
    if (hr >= 0)
    dynamic obj = Marshal.GetObjectForIUnknown(pUnk);
    dynamic app = obj.Application;
    app.RegisterXLL(xllPath);

  • How to get rid off Youtube pause Popup window on Apple TV?

    The Youtube new interface has a Pause popup window. It is really annoying as it hides most of the picture and greys out the rest if you decide to examine a examine a still. Is there a way to surpass that?
    Thanks
    /k

    No there is no way to Mirror full screen from an iOS device to the Apple TV. iOS devices are not 16:9 like your HDTV so the mirrored image appears as the size your iOS device would be if it were the size of your TV. Hope that makes sense.

  • Starting Firefox I get the "Send Error Report" popup window. It states "firefox.exe has encountered a problem and needs to close."

    This just started today. Everything seems fine. I just push the popup off to the side and continue to use the browser. If I were to click on the, "Send Error Report" or the "Don't Send" buttons then Firefox just closes!
    Strangest thing yet, trying to figure it out!
    Oh, I tried the reboot without add-ons! Even did the reinstall, still the same???

    Just got back online, still working on things, BUT ???
    I went back and dumped Norton's which I get for free from Comcast. I downloaded the AVG scanner. Went through all the bells & whistles and things seem ok ???? But I haven't done the reboot yet, so will do that soon. But I wanted to drop a line here and let you all know what is happening.
    And Thanks Fred, the funny thing was it did seem to have something to do with their update??? I do like Norton's but my son uses this AVG and he said it was better, lol!!! But again, everyone has their favorite!
    Mine is Norton's so once I confirm that everything is good, I'm going to try redoing Norton's and I'll try your suggestions, if they don't fix it!!
    Thanks again, and will let you know if this is the fixed!!!

  • In can't get rid of new tabs/popup windows opening up

    I cant get rid of pop up windows. Whenever I am on a web page a new tab will open up and will be some sort of advertisement. I have run CC Cleaner, McAfee, Spybot and advanced system cleaner several times. My pop up blocker is on and there are no exceptions listed under it. I also have the adblockplus addon installed but they still keep hijacking my browser. I have tried uninstalling and reinstalling FireFox and still nothing. I don't know what else to do. Can anyone please help me?

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.<br />
    <br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • CS4. How do I get rid of open as tabs and get back to open as sep. windows.

    How do I get rid of the documents piling on top of each other as tabs instead of separate windows? Thank you.  CS4 Illustrator, Mac, OS 10.6.2

    Thank you. And now that I opened Illustrator CS4 for lst time, InDesign won't open and says it needs a Spelling Service plug-in and need to reinstall it which I have no idea of where to get it or where to install it from!!!  Any ideas on that part? Thank you.

  • How to get the handle of the Validation Failure Message Popups.

    Hi,
    I'm using Jdev 11.1.2.0
    I have added validation rule(less than system date) and failuremessage("date should not after currentdate") on the date field in EO.
    when I enter greated than the sysdate in date field in page, I'm getting validation failure message in a popup with ok button. its working good.
    but when i click on the popup ok button, the focus should go the date field again and it is higlighted.
    So, how to get the handle of the popup's ok buton? and how to highlight the datefield after clicking the popup's ok button?
    Any suggestion would be appreciated.
    thank you.

    if i understood correclty means,
    i hope that, error popup is provided by framework.. how could be possible? to catch the error popup ok button.
    am not well aware of catching the error popup which is provide by framework..
    but i had answer for your part of the question,
    if the condition go off false means you force the cursor into date field. this is can be done using 'javascript'. unless using script you can't do that. ADF doesnt provide any force focusing feature.
    please google how to focus the field.
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
    http://technology.amis.nl/2008/01/04/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/
    http://lspatil25.blogspot.in/2012/04/adf-default-cursorfocus-to-input-field.html
    http://donatas.nicequestion.com/2012/04/component-to-set-initial-focus-in-adf.html

  • Get values in a popup window into the livecycle forms

    Hi,
    Is it possible to get the values in a popup window in a livecycle form or assign the values in a poup window into livecycle form?
    Thanks

    Hi,
    There is a method in the Acrobat SDK called execDialog that can be called from within an XFA Form. You can pass values to and from a dialog using this method. It is a bit involved and therefore I strongly recommend AcroDialog, which is a plugin for Acrobat from Windjack Solutions (http://windjack.com/product/acrodialogs/).
    You can use this graphical interface to create dialogs and hten copy the script into your XFA Form.
    Hope that helps,
    Niall

  • How to allow some popup windows in 3.6.6?

    Since moving to version 3.6.6 I can't get Firefox to allow any popup windows. Adding site names to the exceptions list makes no difference. Neither does unticking the "Block popup windows" option.
    == This happened ==
    Every time Firefox opened
    == Updated to 3.6.6

    Go to Tools, Options, Content, in Content clip off Block Pop up Windows or click on Exceptions and put in your favorite web addresses. Then go to Advanced tab and click off "Warn me when web sites try to redirect or reload the page".

  • Dowload file using popup window

    My JSP page mutiple download buttons. On clickof this button i am opening a popup window which calls the download servlet. The system can be used by mutilple users. Due to download memory limitatons, only one user can be allowed to download at a time in the servlet. My requirement is, when the download is going on for one user,and when other users try to download the file, i need to show busy screen for them and soon as the first user download completes, the next download from the pool should start automatically by replacing the busy window. Plz suggest me if you have any idea.

    I have one abstract idea for this. Create one more servlet for controlling purpose. Let the clients to contact this servlet for the file. If the real servlet is free then it will forward it to real one else it will send some response to client which indicates server busy. In this response put some client side script to send the request for every 10 sec( it should be decided by u this time frame). Make sure that your controlling servlet maintain some data to identify the older request. Pass the older request to the original servlet once real servlet is free.
    i had similar solution, it was working fine for single client. When i was testing fro multiple concurrent customers, the popup windows behaviour was unexpected. Let us say, i opened 4 broser instances and cliked on 4 webpages download buttons. As per my implementation the first cliked one started downloading and for other users i am showing busy popup window. As soon as the first one finished downloading, the either of 3 waiting requests will be served in the pool. For the one whose download slot available, the new window will be opened with download servlet and i am closing the busy popup window for that client. This goes on like this. During the process sometimes, i am getting the same file downloaded for 2 clients. The first download works fine, no problem. The second download also works fine, but when thid download starts, insted of opening for separate window for download, it shows the same file which downloaded for second client or browser. I am pasting here below the code which i am working on.
    boolean firstTime = true;
    boolean firstTimeFuserAvailable = true;
    Object parserLock = new Object();
    java.io.PrintWriter out = null;
    while (true){
         System.out.println("\nTrying to get fuser for vehicle id:"+vehicleId);
         synchronized(parserLock){
              if (mdfDataDownload.isFuserAvailable()){
                   MDFFuser mdfFuserInstance = MdfFuserPool.getInstance().checkOut();
                   session.setAttribute("mdfFuserInstance", mdfFuserInstance);
                   System.out.println("\nGot Fuser for vehicle Id:"+vehicleId);
                   if (firstTimeFuserAvailable){
                        System.out.println("\nForwarding the request for vehicle Id:"+vehicleId);
                        rd.forward(request, response);
                        break;
                   } else {                                       
                        System.out.println("\nOpening new window download for vehcile Id:"+vehicleId);
                        //set the MIME type of the response to "text/html"
                             //response.setContentType("text/html");
                             //use a PrintWriter send text data to the client
                             //java.io.PrintWriter out = response.getWriter();
                             //output the HTML content
                             out.println("<html><head>");
                             out.println("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/master.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/header.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/icons.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/table.css' type='text/css'>");
                             out.println("<title>Intermediate Page</title></head>");
                             out.println("<script language='JavaScript'>");
                             out.println("var date=new Date();");
                             out.println("var datetime = date.getYear()+date.getMonth()+date.getDate()+date.getHours()+date.getMinutes()+date.getSeconds()+date.getTime()");
                             out.println("window.open('/FCDA_CARS_DCC/FusedMdfDownloadServlet',datetime,'width=700,height=600')");
                             out.println("window.close()");
                             out.println("</script>");                         
                             out.println("");
                             out.println("</div></div></body></html>");
                             out.flush();
                             break;
              } else {                                  
                   firstTimeFuserAvailable = false;                              
                   if (firstTime){
                        System.out.println("\n Opening first time window for vehicle id:"+vehicleId);
                        //set the MIME type of the response to "text/html"
                             response.setContentType("text/html");
                             //use a PrintWriter send text data to the client
                             out = response.getWriter();
                             //output the HTML content
                             out.println("<html><head>");
                             out.println("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/master.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/header.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/icons.css' type='text/css'>");
                             out.println("<LINK rel='stylesheet' href='/FCDA_CARS_DCC/theme/dcx_fixed/css/table.css' type='text/css'>");
                             out.println("<title>Error Page</title></head><body>");
                             out.println("<div class='wrapper'>");
                             out.println("<div class='mainborderless'>");
                             out.println("");
                             out.println("");
                             out.println("Please wait while fusing starts....");
                             out.println("");
                             out.println("");
                             out.println("</div></div></body></html>");
                             out.flush();
                             firstTime = false;
                   try{
                        Thread.sleep(2000);
                   }catch(InterruptedException e){
                        System.out.println("Interrupted Exception:"+e);
    The FusedMdfDownloadServlet is the actual downloading servlet.

  • ALV Report : How to display popup window?

    Hello Friends,
    I have developed oone ALV report using classes.
    When i hit a button, I want to display one pop window which gives me my internal table details and one more button in this popup window.
    Is it possible to call pop window with ALV using classes??
    Regards
    RH

    Use the following Methods:
        METHODS: lmt_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
                                       IMPORTING e_object
                                            e_interactive,
    ** Method for User Command
                 lmt_command FOR EVENT user_command OF cl_gui_alv_grid
                                       IMPORTING e_ucomm,
    FORM sub_create_toolbar USING uw_object
                                  TYPE REF TO cl_alv_event_toolbar_set
                                  uw_interactive TYPE char01.
      DATA: lw_stb_button TYPE stb_button.
      FIELD-SYMBOLS: <l_button> TYPE stb_button.
    ** Fill in the toolbar Button
      lw_stb_button-function  = 'IFLU'.
      lw_stb_button-icon      = icon_te_receipts.
      lw_stb_button-quickinfo = text-b01.
      lw_stb_button-text      = text-b01.
      INSERT lw_stb_button INTO uw_object->mt_toolbar INDEX 3.
      READ TABLE uw_object->mt_toolbar ASSIGNING <l_button> INDEX 1.
      IF sy-subrc = 0.
        <l_button>-butn_type = 1.
      ENDIF.
    ENDFORM.                    " sub_create_toolbar
    FORM sub_access_command USING uw_ucomm TYPE sy-ucomm.
      DATA: lt_row   TYPE lvc_t_row,
            lt_rowid TYPE lvc_t_roid,
            lw_count TYPE lvc_index.
      FIELD-SYMBOLS: <l_row> TYPE lvc_s_row.
    ** Get the Selected row to be displayed
      CALL METHOD gw_grid->get_selected_rows
      IMPORTING
        et_index_rows = lt_row
        et_row_no     = lt_rowid.
    ** User Command
      CASE uw_ucomm.
        WHEN 'IFLU'.
    ** Read the index from which the Document Flow was selected
          READ TABLE lt_row ASSIGNING <l_row> INDEX 1.
          IF sy-subrc = 0.
            PERFORM sub_get_detail USING <l_row>-index.
          ENDIF.
        WHEN c_detail1.
    ** Call the screen or the Function Module here to display the popup.
          PERFORM sub_show_detail USING abap_false.
        WHEN c_detail2.
          PERFORM sub_show_detail USING abap_true.
      ENDCASE.
    ENDFORM.                    " sub_access_command
    Hope That Helps
    Anirban M.

  • How to close a popup window in a used component?

    Hi Experts,
    I have two applications in the same project, and they each have one component controller. Let they be component A and B. They have similar functionalities and screens. There is a popup window in A that I would like to use in B instead of creating a new popup window in B, so I added a used component of A in B in order to share the popup window. I am able to click a button in B to get a popup window from A successfully, but I am unable to close the popup window since the event has been created in A.
    Can anyone suggest me how to fix this please? I would really appreciate your help.
    Thanks,
    -Napadol

    Hi,
    You can either use the approach above, which is having an Attribute, type IWDWindow in B's Component Context. When you open the popup you store the reference. When you click close you get that reference back and destroy the window.
    Note, I'd suggest you to have your "View" with no Close Button. Then in Component A you create another View that has an UIViewContainer with your Popup View. You can code the Close code in Component A.
    This way you can do the same and have a code in Component B to close your window.
    Other way would be having it as a Component variable and using the Component Interface on A (create a Method) that goes to Component A and destroy that instance.
    Regards,
    Daniel

  • Popup window doesn't show in correct position in responsive design (was: place object at cursor)

    Hi Everyone,
    I'm creating a software demonstration using screen captures and Edge Animate.  There are popup windows in this product where the user hovers the mouse over a row of data and a popup appears at the mouse position with more information about that data.  I have used
    sym.$("myObject").css({"position":"absolute", "top":e.pageY , "left":e.pageX});
    and it works fine until I set the stage to "responsive" or I scroll down the page to access more rows of data.  When this happens, the popup appears far from the mouse.
    I'm not a strong coder, but does anyone know how I can get Edge Animate to recognize the true position of the mouse on the screen and then tell the popup to appear there?
    Any advice would be appreciated.
    Thanks
    Randy

    Sorry to hear about that. The problem is with the following line:
    mySymbolObject.element.css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
    If you change it to the following:
    mySymbolObject.getSymbolElement().css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
    It should start working.
    With the refactored runtime, some of the internals have changed for various classes, but we have made sure that the public API's do not break. getSymbolElement() is the public API available which returns the underlying element wrapper for the symbol. Hope this resolves your issues.
    -Dharmendra

Maybe you are looking for

  • SDN PI Forum in "Santa" mode for next 5 days

    In spite of being a bit late about it, I would still try to spend some time with the neglected threads on PI forums and close them before the commencement of the New Year. The work could be questionable but I would try to be as fair as possible. Once

  • Wage type missing on remuneration statement

    Hello Experts, We made a bonus pay on Jan. through off-cycle payroll. On the remuneration statement we can not see this wage type. But we know it has been created because the Annual gross cumulation is correct. Does any one know in which table the wa

  • Can't run x

    Hi there I've installed arch x84_64 on my ati based notebook . I've installed catalyst and catalyst-utils from aur but when i try to run startx to get in xfce4 i get the message (WW) No device section found for instance (PCI something i can't remembe

  • Help on HR ABAP

    Hi , Can anyone Please provide me good Questionaries about HR ABAP. Thanks in Advance, PAVAN.

  • Border Manager 3.9 upgrade

    Are current subscription holders of SMB6.6 eligable for the upgrade to 3.9 border manager?