How to close a window of IE7 using jsp code

Hi,
Can any one suggest how to use window.close method for closing a window of IE7 , presently i am using below code for logging off a page but i am recieving an error saying object expected and some text undefined , can any one let me know what extra code is required to be added in below jsp code  for logging of a window in  IE7
function logoff()
        if (EPCM.getUAType() == EPCM.MSIE)
            window.returnValue = 'logoff';
        else
            window.opener.logoff();
        closeWindow();
    function closeWindow()
        window.close();
Thanks
Abhai

Hi Abhai,
In your javascript, you can add a try catch block to check which object is null.
Also check this:
Portal user often can't log off because of the Log off window was blocked
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers

Similar Messages

  • How to close parent window when we use call method l_window_manager- create

    hi...
    how to close parent window when we use call method l_window_manager->create_external_window
    thank you.

    hi
    good
    go through this link,hope this ll help you to solve your problem
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011
    thanks
    mrutyun^

  • How to close ie window?

    hi,
    i need to write a program that could open and close a particular url in ie browser for a particular number of times. i could open the browser using following code
    cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    Process p = Runtime.getRuntime().exec(cmd);but i could not find how to close the window - please help

    p.destroy()... but how do you decide when to destroy the process -- are you using a timer or whuh?
    By the way, if you just want to open a browser in a platform independent way, you could try the new Desktop [browse |http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)] method.

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How can I install Windows 8.1 using a USB Pen Drive in Late 2011 Macbook Pro with DVD R/W given.

    How can I install Windows 8.1 using a USB Pen Drive in Late 2011 Macbook Pro with DVD R/W given.
    I have Boot Camp 5.1.2 (497) and there is no option for installing using USB. I have downloaded an image of Windows 8.1 already.
    I can't install using DVD R/W because it's not working.
    Please help me.
    Thank you.

    unlocked by myself
    thanks

  • How can I start windows 8 without useing my password

    how can I start windows 8 without useing my password

    Hi,
    Review the information posted in this thread.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • How to close open windows with ios7, How to close open windows with ios7

    How to close open windows with ios7, How to close open windows with ios7?

    Guess they thought we needed more exercise so now we have to swip them to close.....miss iOS6. My eyes are blurry now after looking at my phone, and my arms are tired from swipping lol

  • How do I produce an excel file using java code

    How do i produce an excel file using java code.
    If it is possible would ne one have ne source code as an example.
    I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any information. To be exact ne source code.
    Thanks
    Lee

    That's what I use and I'd be the first to admit that it's very messy. But it works. Go use Google and see what else you can find.

  • How to increase TD width in SAP using HTML code in mail body

    Dear guru.
    how to increase TD width in SAP using HTML code in mail body
    Sample Code :
    CONCATENATE '<tr height= "3%"> <td style="background-color:#CCC8AA;" style="font = 12.0" colspan = 3 >' WA_EIS_TOT-DESC '</td>'
           INTO WA_OBJTXT-LINE separated by space.
      APPEND WA_OBJTXT TO T_OBJTXT.
      CLEAR: WA_OBJTXT.
    Regards,
    Dharmin Shah

    Hi Dharmin,
    Did you try something like
    CONCATENATE '<tr height= "3%"> <td  height="23" width="84" style="background-color:#CCC8AA;" style="font = 12.0" colspan = 3 >' WA_EIS_TOT-DESC '</td>'
    Regards,
    Soundarya.

  • Determin how many user log on the site using JSP/Servlet?

    Hi all,
    Is there a way to determine how many user log on the site using JSP/Sevlet? I'm running Apache 2.x & Tomcat 4.x
    I'm trying to get a list of user currently log in the site.
    Please help!
    Thanks,
    -JN-

    You could use the HttpSessionBindingListener interface. Every time a user logs into the session put a user object into the session. The user object will implement the HttpSessionBindingListener interface. When the user object is added to a sessiion it recieves an event and it increments a counter. When the session times out or you invalidate the session because the user has logged out the user object will recieve an event and it can then decrement the counter.
    This will at least tell how many active user sessions there are.

  • How to access a JAVA Script variable in JSP Code

    How to access a JAVA Script variable in JSP Code. I have been unable todo this.
    Plz Suggest a way.
    Thanks
    Soumya

    try to do this code
    String s=request.getParameter("javascriptvariablename");

  • How to close the window openned by System Exec VI automatica​lly?

    Hello,
    I am using System Exec VI to lauch an exe file built from a LabVIEW program. When running System Exec VI, the window of exe file pop out and stays there even after all tasks are completed. I have to close it every time manually. Anyone here know how to close the exe file window automatically when it's done?
    Thanks,
    Jean
    Message Edited by Jean_CLD on 03-25-2010 11:25 AM
    Message Edited by Jean_CLD on 03-25-2010 11:29 AM
    Solved!
    Go to Solution.

    If I understand the question correctly you need to add an invoke node at the end of your application to exit. Depending on the whether it is running as a stand alone application or within LabVIEW it will either exit or stop execution. I've attached the VI I use in my applications.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Exit application.vi ‏13 KB

  • How to close child windows at logout?

    I was wondering how i can ensure that when a user loggs out,
    any related open child windows from that session are automaticaaly
    closed. The Application is written in ASP VBscript.
    Basically the user can logout two ways, either by clicking on
    the logout link or by closing the browser window. For the latter
    what i did was to create an even for the "onUnload" event of the
    browser. So when the user closes the window, it will also logg the
    user out.
    Now i also wanted to automatically close any child windows
    that the user may have opened when he either loggs out or closes
    the browser window. How can I accomplish that without prompting the
    user that the window is about to close?
    B.T.W. I use the
    window.open method to open the child windows, using either
    javascript or vbscript.

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How to Close external window?

    Hi Experts,
    1) For one of the development requirements, I am required to open my application in
    external window. For the same, I have changed the property of the iView  and page to
    launch the iView in an external window and not to display in content area. Now, I am
    able to display the application in a new window as per the requirement.
    Now, I want to close this window from a button event on the screen, but can't find a way to close it.
    If anyone's having an idea over it, that will be greatly appreciated???
    2) Also, in another application, I am downloading data into excel sheet and the download
    opens in a new window. Once the user clicks on the option (SAVE, OPEN, CLOSE),
    the blank window should close which works well in IE 7 but in IE 6 the user says the blank
    window is visible and they have to close it manually.
    I am using the following code for this:
    excelCSVFile = new FileInputStream(f);
    IWDCachedWebResource cachedWebResource = null;
    if (excelCSVFile!= null)
    cachedWebResource = WDWebResource.getWebResource
    excelCSVFile, WDWebResourceType.getWebResourceType(
    "xls","application/ms-excel"));
    cachedWebResource.setResourceName(fileName);
    wdContext.currentVn_XL_SheetElement().setVa_Resource(cachedWebResource.getURL());
    workbook.close();
    * BEGIN: Open new window: download button
    IWDWindow win =  wdThis.wdGetAPI().getComponent().getWindowManager().createExternalWindow
    (cachedWebResource.getAbsoluteURL(),"Print Content",false);
    win.setWindowSize(0,0);
    win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    win.removeWindowFeature(WDWindowFeature.MENU_BAR);
    win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    win.removeWindowFeature(WDWindowFeature.STATUS_BAR);
    win.setWindowPosition(200,200);
    win.show();
    * END: Open new window: download button
    For this if I try win.destroy() or win.close() or win.hide(), after win.show
    this doesn't shows the download options at all (quite obviously   ).
    I want to close this blank window automaticaaly once the user selects
    any option for download. Is there any solution to this or am I doing something wrong?
    Helpful answers will be appreciated. Thanks in advance.
    Regards,
    Gaurav Bhardwaj

    Hi Gaurav,
    If the external window contains the view of the wd component then only you can close the window.
    Try like this:
    Create a context attribute of IWDWindow in the calling view - component - called view and map them in all controllers.
    //set the context attribute  in calling view
    win.show();
    wdContext.currentContextelement().setWinref(win);
    * END: Open new window: download button
    In onActionxxx event of the downlload button
    // close the window
    wdContext.currentContextelement().getWinref().destroyInstance();
    Regards,
    Siva

  • How to close a window from program?

    How do I programmatically close a window so that the windowClosing() event is fired? I can't seem to find example code anywhere.
    Thanks, Brad

    Hi Brad,
    This is just a suggestion (I haven't tried it myself), but perhaps the "java.awt.Robot" class can help?
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Robot.html
    Good Luck,
    Avi.

Maybe you are looking for