Close Window (main application) in 2004s

Hi,
I have a webdynpro application (developed in 2004s)  where I have a close button. When user clicks close button, I simply need to close the browser.
I tried using javascript:void(window.close())" as exit plug parameter from interface view still throws me an exception  com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Invalid URL=javascript:void(window.close())
Is there any way to close the main application window.
Thanks for your time and help.
Best Regards,
Shiva

Hi,
Go thru the below steps. Here u need to create a html file to close the main window.
1. In your component's interface view, create an exit plug. Name it as - ExitPlug.It's type as "Exit".
2. Create a paramater for this exit plug. Name this parameter "Url". It should be exactly like the same name.
3. In your view add the interface view as a required controller.
4. Create your HTML file. Let's say you call it Static.html.
<html>
<head>
<script langauage="javascript">
function closeWin(){                    window.close();     
</script>
</head>
<body onload="javascript:closeWin();">     </body></html>
5. Save this in the mimes folder for your DC under your package. You do this from the navigator view.
6. Now use the following code:
try {String url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"Static.html");wdThis.wdGet<your component name>InterfaceViewController().wdFirePlugExitPlug(url);} catch (WDURLException e) {}
For more information go thru Re: JavaScript in WD link.

Similar Messages

  • Clicking on files closes windows or applications

    Have been a Mac user since the 80s and never encountered this before. I maintain all my machines religiously. Have not added anything new to my PowerBook. Help. Don't know what to do.
    When choosing a file in an open finder window, the window closes and then reopens back up to just a window with the image of the hard drive. If I double click quickly on a file, the same thing will happen but the file will open in the application. No window comes up stating there is problem.
    When opening a file from an open application or attaching to an email, two things happen:
    1. After slecting a file I get the spinning icon and then the application crashes.
    2. In the upper left of the window where I can change from lists to columns, the icon shows the area for the list on the left with no image and the area for the columns on the right with an image. I can toggle between the two.
    Ran Disk Utilities and it shows no problems.
    Ran Disk Warrior and everything is good... except for 7 things that are "over-lapping" files. All but one are in Frameworks. The other is in Macintosh/Usr/Bin/.
    Do not have an install disk. Bought this PowerBook used from an Apple dealer. I do have Tiger software but it is for another computer I have. Can I use it?
    Thanks for any help.

    To Apple Discussions!
    "Do not have an install disk. Bought this PowerBook used from an _Apple dealer._"
    An Apple dealer sold you a Mac without the system install DVDs that originally came w/the computer?!?!?!? Sacrilegious!!!!!
    The vendor needs to be reported to Apple.
    You need the install DVDs to troubleshoot. You can get replacement System Install & Restore CD/DVDs from Apple's Customer Support - in the US, (800) 767-2775 - for a nominal S&H fee. You'll need to have the model and/or serial number of your Mac available.
    "I do have Tiger software but it is for another computer I have. Can I use it?"
    Nope! System DVDs are machine specific. Cannot use from one Mac to another Mac w/o occurring damage in some cases.
    If you have a *retailed purchased* Tiger _full installer_ DVD, you can use that.

  • Close main application window in WD for Java

    Hi there,
    Is there anyway I can close the main application window(not popup) programatically.
    I tried calling the exit plug in the interface view controller, but doesnt seem to close the window automatically.
    I am having 2 components, one calling the other..
    Any help will be greatly appreciated.
    Many Thanks
    lm

    Hi LM,
    Check Re: Close the parent window especialy Nibu`s suggestion.
    <i>
    1) In your Interface view, create an exit plug with a parameter Url of type string.
    2) Add your Interface view controller to your current view's required controller. (in properties tab of your view)
    3) After opening the new External window fire the outbound plug as :
    wdThis.wdGet<your interface view controller>().wdFirePlug<your exit plug's name>("javascript:void(window.close())");
    </i>
    It should work for you.
    Best regards, Maksim Rashchynski.

  • How to close sub-application without close main-application?

    My main application has a menu which is used to open sub-application window. When I want to close the sub-application, I do not want to use System.exit(0), because it will close the main-application too.
    And if I use setVisible(false), the sub-application remains in memory.
    How can I close a sub-application clearly and keep the main-application open?

    Stephen:
    Some other object may be holding reference to this object.
    Here is how you debug such as problem.
    1. Run your app in the IDE's debugger.
    2. After you think all refs to the object should have gone away, pause the debug session.
    3. Using the View/Debug Windows/Heap menu, bring up the heap window.
    4. Right mouse click on the heap window. Enter the class name (package qualified) of the object which isn't being collected.
    5. Then, find the object that instance. Select it.
    6. Do right mouse click on that and select 'Show Reference Paths.'
    It will show paths to this object. It will show you who's holding ref to this object, preventing it from being garbage collected.
    Thanks.
    Sung

  • Where are my screens!!??? All my task windows work but the main application window where I Can see my work is missing!

    All my task windows work but the main application window where I Can see my work is missing!
    Help Me!
    I have two operational websites that I can't acces!

    Try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    If that doesn't help continue with:
    move the domain file from your Home/Library/Application Support/iWeb folder to the Desktop.
    launch iWeb, create a new test site, save the new domain file and close iWeb.
    go to the your Home/Library/Application Support/iWeb folder and delete the new domain file.
    move your original domain file from the Desktop to the iWeb folder.
    launch iWeb and try again.
    OT

  • Close window but not application

    I have an application that starts with a splashscreen (with no system chrome) which then loads settings and launches the main application window ( a new window with system chrome). I then want to close the splashscreen window but leave the new window open. The only function that seems to work is air.NativeApplication.nativeApplication.exit() which closes the application not the window.
    Appreciate any help

    Not working.
    You can see the air file here (and the source) : http://www.spiders-design.co.uk/bayamocms.air (it may put a zip extension on the end if so rename it).
    On line 41 of splash.html I want a piece of code that will close the window but leave the newly opened window open.

  • Why won't Firefox 4 on Mac OSX 10.6.7 quit when QUIT is selected? The window closes, but the application remains open necessitating a forced-quit. Until recently it worked fine. I've reinstalled Firefox but the problem persists.

    Firefox 4 on Mac OSX 10.6.7 won't quit when QUIT is selected.
    The window closes, but the application remains open necessitating a forced-quit. Until recently it worked fine. I've Downloaded Firefox again and reinstalled but the problem persists.

    Perform the suggestions mentioned in the following articles:
    * [[Firefox is already running but is not responding]]
    -> Profile in use
    * [http://kb.mozillazine.org/Profile_in_use]
    Check and tell if its working.

  • How to close the main window  from Popup

    hello all,
    i need to close the main window from a popup, so i create a popup and after clicking on close button of this popup, should also the main window be closed.
    how can do this please?
    BR

    Hi
    Please go through this.. check thomas reply
    Re: Close Main Window directly on action on Pop up window
    also check this..
    how to close main window on click of a button on popup window
    cheers,
    Kris.
    Edited by: kissnas on May 12, 2011 5:06 PM

  • How to change the style of the main application window shell

    Hello,
    I am migrating my application from eclipse 3.x to eclipse 4.3 and I want to set the style of the main application window i.e. the shell that is created in application MTrimmedWindow in e4.
    Earlier we were doing it using
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(0, 0));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(false);
    configurer.setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
    But now in e4 application after reading some forum replies I got to know that custom renderer needs to be created for that.
    I created my own renderer extending WBWRenderer and as I wanted to change the style of shell I am overriding createWidget method.
    Now the problem is that if I am just creating a new shell in this createWidget method then it is not working. Might be because this method has a lot of other code also.
    So I copied all this code into my overridden method of createWidget & just changed the style of shell according to my need. Then this worked but for this I have to put some private methods also into my custom renderer class from WBWRenderer.
    SO my question is to confirm that if I am doing it in a right way?
    or is there any other mechanism to do this in a more efficient way?
    Thanks

    This can now be solved with a specific "persisted state" key flag, as documented in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386951 . For example to realize a NO_TRIM window, add the key/value styleOverride/8, where 8 is the value if you get the numeric of
    int val = SWT.NO_TRIM;
    System.out.println(val);
    Hey Zugi: Liebe Grüsse! Master UIBK/2010

  • Firefox will open a New Pop-up Window in Windows 7 Aero. When trying to Close it, it thinks it wants me to Close the Main Window. Why?

    I use Windows 7 Ultimate in Aero-mode. When a new Firefox window is opened, or a Pop-up window appears, I can't close it without first clicking on that page and clicking the "X" in the corner. Instead, whenever I try to close a window that is not the first window (my main window), it will ask me if I want to close the main window with all the tabs... I have noticed some other slight quirks in this stable release as well, but this one is always present.

    When I hover over the window, it does come up front, but as soon as I press the red "X" it goes immediately back to the main window and acts as if I was trying to close that one. Once in a while it will work, but shortly thereafter, it will just go back into this manner. Quite odd. This is the first time I've truly had any problems with Firefox.
    In addition to that problem I have noticed a few things, but one that may be linked is sometimes I'll click a link. Although I haven't specified to open it in a new window, it will do so anyhow. This gets annoying quickly. Usually shutting down Firefox and reopening will fix this (and once in a while just leaving it be for a long time). Somehow, I think this issue is somehow linked to the one above.

  • "Library.lvlib on Main Application Instance" Window Title, is this Lib still associated with previous project?

    Hey folks, 
    Hopefully this is a quick and easy one-  I have a device that I already have a driver for which was placed into a lvlib along with the subvi's inside the driver (etc etc).  This lvlib was put together while I was working on a past project which I think was called "Main Application".
    I'm new to lvlibs I guess, I just want to know if there is some sort of association between this lib and the old project I had, because after saving as, in a new location, opening up the lvlib shows the lib windows that says "Library.lvlib on Main Application Instance"...
    Can anyone confirm that this is normal?  Does this title show up on all lvlibs regardless of where it's used?
    thanks!
    -pat

    (sry about multiple username issue I have going, I'm the original poster)
    I haven't had a chance to test it yet, I'm still working on the project that it's going to be implemented in... Talking to a few other people at work I think it's normal.
    Thx
    -pat

  • HTMLLoader, main application window and scrollbars

    If I instantiate HTMLLoader with "new HTMLLoader.createRootWindow()," scrollbars show up correctly when text overflows the set width and height. I can add it to the stage, but I'm still left with an empty popped up native window
    If I instantiate HTMLLoader with simply "new HTMLLoader()," you can add it to the stage, but it doesn't include scrollbars when the window overflows with text.
    What I want to do is incredibly simple - create a new HTMLLoader instance, have as part of my main application's stage, and get the benefit of the built-in scrollbars.  Why is that so difficult?

    OK - my problem with the HTML Control is I can't seem to add it to a child custom class.
    i.e. - I have my main Air app and a custom class extending UIComponent. I add the custom class to the stage in the main app, and in the custom class, add an HTML Control.  I'm also adding a different HTML Control to the main app.
    Only the HTML in the main app actually shows up. No errors given. What am I missing here?
    Main Air app mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.HTML;
    var _myComp:Comp;
    private function init():void {
    _myComp = new Comp();
    _myComp.init();
    _myComp.x = 200;
    _myComp.y = 200;
    addChild(_myComp)
    var html:HTML = new HTML();
    html.htmlText = "Text on main application window"
    addChild(html);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    Comp Class:
    package {
    import flash.display.Shape;
    import mx.controls.HTML;
    import mx.core.UIComponent;
    public class Comp extends UIComponent {
    public function Comp() {
    public function init():void {
    var shape:Shape = new Shape()
    shape.graphics.beginFill(0,1)
    shape.graphics.drawRect(0,0,200,400);
    shape.graphics.endFill();
    addChild(shape)
    var html:HTML = new HTML();
    html.htmlText = "Text Inside child component";
    html.x = 200
    this.addChild(html);
    trace(html.htmlText)

  • I can't finish the installation because a window tells to close the SafariNotificati application, but i haven't got anything open other that the Creative cloud window

    I can't finish the installation of Acrobat XI Pro, because a window pops up and tells me to close the SafariNotificati application, but i haven't got anything open other that the Creative cloud window, it always stops at 42%, what can I do? All other applications downloaded without any problem

    I am having a similar problem. Running Xp.
    Latest revision of firefox.
    After using firefox for a while if I exit, parent.lock is locked and i have to reboot to reload firefox.
    I have killed all firefox applications from task manager (usually there are none). and I have tried 3 different "file unlock" programs including unlocker to no avail.
    I also recently installed a program that shows -all- open files, and parent.lock is not listed, and thus not closable/unlockable from there.

  • How can I close windows when quitting an application - but leave desktop windows open?

    In Mavericks...
    Is there any way to close the windows of application (when quitting - ie System Preferences => General) BUT not have this affect the finder application.
    I want the windows I have opened in the finder to remain opened, but everything else to close upon quitting

    Well, for some time now (since I upgraded to Mavericks) my startup goes on and on.
    It will, on occasion, finish correctly and I can go on with my work, but usually, it hangs.
    I can restart the finder 2 or 3 times and get it to finish loading.
    If I go into System Preferences => General => and turn “Close windows when quitting an application” on, then restart, the finder usually starts up faster and does not hang
    Obviously, there is some operation that is running in the background that is trying to restore itself to some unknown state that is holding up the finder application.
    I have uninstalled and turned off all sort of applications that run in the background, but have not yet been able to locate the culprit.
    So, I’d like to be able to have “Close windows when quitting an application” on because everything else on the machine can revert to a clean start-up state -- but I want the windows I leave opened in the finder to remain opened and where I put them.

  • Close portal main window without confirmation message

    Hi All,
    Is it possible to close the Portal Main Window (main page) without a confirmation popup window.
    I am launching an iView (can be excel sheet/html page etc)  using Quick Link which is attached to a role.
    When this iView opens, I want to close the portal main page.
    I am using the below code to close the main window.
    window.top.close()
    But it is prompting a confirmation popup window "Do you want to close this window". I don't want this popup message.
    I have tried with below code also, but it is neither prompting nor closing the window.
    window.opener=null;
    window.close();
    window.opener=self;
    window.close();
    Can anyone tell me how to acheive the above requirement.
    Thanks
    Chinna.

    Hi Baby,
    I am using IE6.
    I am executing this code from my AbstractPortalComponent within the doContent method.
    I have tested by replacing the browser URL with this script
    javascript:window.top.open('','_self','');window.close();
    It pops up the confirmation window.
    Thanks
    Chinna.

Maybe you are looking for