Save and close popup window

I have a typical popup window launched using the builtin javascript:popupURL().
I would like a Save and Close button on this popup window that does
1. Submits the popup page so that changes are saved into session state
2. Close the popup window
3. Refresh the parent window so that updates in (1) are reflected
What is the recommended way of doing this? I was thinking of the following URL redirect on the Save & Close button
doSubmit('SAVE');
window.opener.location.reload();
window.close();Do I need a same-page branch on the popup page? If so, why? If not, why? ;-)
Comments?
Thanks

This is a bit of javascript that I nicked which works well for me:
-- 1. Add the folowing to your page header or create a new page template --
-- (popup window template) and put it in the header section. --
SCRIPT LANGUAGE="JavaScript">
function loadinparent(url, closeSelf){
     self.opener.location = url;
     if(closeSelf) self.close();
</SCRIPT>
-- 2. Use the following to call the function. the true and false keeps the parent--
-- window open or closed. Obviously set any values in the URL. --
javascript:loadinparent(''<URL>'', true)
eg. javascript:loadinparent(''f?p=&APP_ID.:40:&SESSION.::NO::P40_ID:'||ID||''', true)
-- Inc the following comment in your header --
-- Version 1.0
-- Last Updated: May 18, 2000
-- Code maintained at:
-- http://www.moock.org/webdesign/javascript/
-- Copy permission granted any use provided this notice is unaltered.
-- Written by Colin Moock.
Simon

Similar Messages

  • Office 2013 document with Czech spell check lags by save and close on Windows Server 2012R2 RDS session host

    On our Win Srv 2012R2 RDS session host server (terminal server) I have bad problem. Office 2013 documents with Czech spell checking lags (1-2 min) when I close and save document. When I change spell checking on English everything works OK. On Windows 8.1
    works OK both spell checking.
    I tried to investigate with process explorer, and when winword.exe lags, active thread is wwlib.dll!DllGetClassObject with Stack:
    KERNELBASE.dll!ReadFile+0x3
    MSGR2CZ.DLL!GramGetError+0x3ffeb
    MSGR2CZ.DLL!GramGetError+0x4045f
    MSGR2CZ.DLL!GramGetError+0x47c7f
    MSGR2CZ.DLL!GramGetError+0x10e17
    MSGR2CZ.DLL!GramGetError+0x125c2
    MSGR2CZ.DLL!GramOpenMdt+0x189
    wwlib.dll!wdCommandDispatch+0x251ce8
    wwlib.dll!DllGetLCID+0x31ef72
    wwlib.dll!DllGetClassObject+0x10887a
    wwlib.dll!DllGetClassObject+0x108535
    wwlib.dll!DllGetClassObject+0x107bc6
    wwlib.dll!DllGetClassObject+0x1030c1
    wwlib.dll!DllGetClassObject+0x1077df
    ntdll.dll!RtlInitializeExceptionChain+0x84
    ntdll.dll!RtlInitializeExceptionChain+0x5a
    MSGR2CZ.DLL is Czech language checker.
    Any idea?

    Hi,
    It seems to be an Office related issue, I suggest asking the question in Office forums for help.
    http://social.technet.microsoft.com/Forums/office/en-US/home?category=officeitpro&filter=alltypes&sort=lastpostdesc
    Thanks for your understanding.
    Jeremy Wu
    TechNet Community Support

  • Office 2013 document with Czech spell check lags when save and close on Windows Server 2012R2 RDS session host

    On our Win Srv 2012R2 RDS session host server (terminal server) I have bad problem. Office 2013 documents with Czech spell checking lags (1-2 min) when I close and save document. When I change spell checking on English everything works OK. On Windows 8.1 works
    both spell checking OK.
    I tried to investigate with process explorer, and when winword.exe lags, active thread is wwlib.dll!DllGetClassObject with Stack:
    KERNELBASE.dll!ReadFile+0x3
    MSGR2CZ.DLL!GramGetError+0x3ffeb
    MSGR2CZ.DLL!GramGetError+0x4045f
    MSGR2CZ.DLL!GramGetError+0x47c7f
    MSGR2CZ.DLL!GramGetError+0x10e17
    MSGR2CZ.DLL!GramGetError+0x125c2
    MSGR2CZ.DLL!GramOpenMdt+0x189
    wwlib.dll!wdCommandDispatch+0x251ce8
    wwlib.dll!DllGetLCID+0x31ef72
    wwlib.dll!DllGetClassObject+0x10887a
    wwlib.dll!DllGetClassObject+0x108535
    wwlib.dll!DllGetClassObject+0x107bc6
    wwlib.dll!DllGetClassObject+0x1030c1
    wwlib.dll!DllGetClassObject+0x1077df
    ntdll.dll!RtlInitializeExceptionChain+0x84
    ntdll.dll!RtlInitializeExceptionChain+0x5a
    MSGR2CZ.DLL is Czech language checker.
    Any idea?

    Hi,
    As the log, MSGR2CZ.DLL and wwlib.dll were both of the Microsoft libraries,not the third-party libraries. Thus, we need to analysis what happened with the dump file. But, it is beyond what we can do in the forum. I recommend you open a ticket with Microsoft
    engineer.
    Thanks,
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • Firefox asks (twice) to save and close tabs, on new open windows without tabs, when i close them.

    About one month ago, i started to receive a message box from firefox, asking if i wanted to save and close tabs, on newly open windows (and pop-ups) without any tabs open on them.
    And everytime i close the windows without tabs, firefox asks it twice...
    I did not made any changes, so i don't know why it started doing this.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Welcome window problem.  appears every time i save and close a file of photoshop

    How to fix a bug regarding welcome window. this window appears every time i save and close a file of photoshop, its started after the last update 2014.2.0

    See this document: Troubleshoot Welcome Screen in Photoshop
    Scroll all the way down to the bottom. There's a check box "Don't Show Welcome Screen Again"
    You can relaunch the screen at a later date by selecting Help>Welcome Screen...
    ~ Arpit

  • Sharepoint 2003 Cannot save change by IE when click Save and Close button to save change on survey item

    I am using Windows 7 SP1(cannot confirm the IE version, suppose IE8).When I tried to edit a survey item, click Save and Close button. Data cannot be saved.No problem with my account or permission since I can change it on another computer.Below action cannot
    fix the problem:clean IE catch, reset IE, reinstall IE, rebuild windows profile.
    error can be seen at the IE status bar
    Erros on this webpage might cause it to work incorrectly
    'length' is null or not an object
    custom_ows.js
    'undefined' is null or not an object
    custom_ows.js
    Code:0
    URI: http://server/_layouts/1033/custom_ows.js

    Mainstream Support for SharePoint 2003 has already ended and it does not list IE8 as a supported browser:
    http://office.microsoft.com/en-us/technet/system-requirements-HA001160515.aspx?pid=CH011719821033
    You can always try to add the site to Compatibility Mode, but there is no guarantee that it will work in this scenario,
    http://windows.microsoft.com/en-us/internet-explorer/use-compatibility-view#ie=ie-8
    Dimitri Ayrapetov (MCSE: SharePoint)

  • IMessage beta loose all saved conversations when I open and close a window.

    iMessage beta looses all saved conversations when I open and close a window.
    Just reporting this bug... Could not find anyother place to do it.
    Jonathan

    I thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.

  • Automatically open, save and close excel?

    I need import data from Excel to SQL.
    Now, I use tSQL to directly read the excel files and transform to the SQL table.
    As the user Excel is not a good format for SQL to read, I need use formula to transform the excel to be a SQL readable format.
    Now, I add a sheet to copy the data from the sheet which user input the data and then ask the user to copy the excel to a specific location for import.
    However, this will make the data in the excel double and result a large excel file.
    I am thinking if it is possible to create a excel to use formula to copy the data from another excel.
    Then, I need find some method to open that excel, let the content refresh from the source excel, save and close it.
    Then I can directly use this excel for data import.
    Is there any simple way to do so? I don't know marco much...
    Ivan

    No formula could do this (Automatically open, save and close excel).
    You need to recode a marco or write a macro. Why donot you ask in msdn?
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    example:
    Sub auto_open()
    Application.OnTime Now + TimeValue("00:01:00"), "wswx"
    End Sub
    Sub
    wswx() If Not ThisWorkbook.Saved
    Then ThisWorkbook.Save
    ThisWorkbook.Close
    End Sub
    KR

  • Use VBA and Excel to open Dreamweaver HTML (CS5), find and replace text, save and close

    I wish to use VBA and Excel to programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the code view of these files, save and close them.
    I have  5000 associations between Find: x0001 and Replace: y0001 in an Excel sheet.
    I have the VBA written but do not know how to open, close and save the code view of the ####.html files. Please ... and thank you...
    [email protected]

    This is actually the code view of file ####.html that I wish to find and replace programmatically where #### is a four digit number cataloguing each painting.... In 1995 I thought this was clever... maybe not so clever now :>)) Thank you for whatever you can do Rob!
    !####.jpg!
    h2. "Name####"
    Oils on acrylic foundation commercial canvas - . xx X xx (inches) Started
    Back of the Painting In Progress </p> </body> </html>
    Warmest regards,
    Phil the Forecaster, http://philtheforecaster.blogspot.ca/ and http://phils-market.blogspot.ca/

  • Save and Close button issue in CRM 2013 for Activity Type Appointment

    Hi All,
    Have come across a strange behavior in CRM 2013 and would like  to be sure that it really is an issue which others have encountered too.
    Open a Case record, and click on Activity navigation link to see the Open Activity Associated View. Then try creating an Activity of type Meeting and click on
    Save & Close button (not just Save). When you refresh the view, the activity might show up. But repeat the same steps and create another Activity of Type Meeting and this activity will not show up. It doesnt show up even in the All Activities
    view. Seems like the activity does not get created when using Save and Close button.
    This behavior is replicated even on online 30 day trial version. Any inputs?
    Regards,
    Yogesh

    The problem only occurs when your appointment times clash.   "Save and close" just throws the appointment away.  "Save" tells you about clash (or perhaps it's just unavailability) and allows you to ignore and continue with the
    save.

  • Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?

    Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?  I have a hand condition at the moment that makes it painful to mouse the cursor over to the arrow and click it (for instance, in the sidebars for Finder or iTunes) to open or close a folder.  If anyone knows a keyboard shortcut for this, I'd really appreciate it--thanks!

    OS X keyboard shortcuts

  • Hello, Indesign 6 will not allow me to save and close my file

    Hello, Indesign 6 will not allow me to save and close my file

    Try exporting to .idml. If that works, openthe .idml and save as a new .indd.
    If it doesn't work, force quit ID and then restart. Auto-recovery should kick in and reopen the file at about the last state, then try again.

  • Keep getting corrupted temp save file when I save and close.

    When I save and close a numbers spreadsheet, about 20% of the time I will be left with the normal file and a weird temporary file with a "~" on the end of the file name.  I can't delete the file or do anything with it.  It will let me open it, but even when I save it still says I cant delete because the file is in use.
    Example-
    Work on spreadsheet1.  Hit save and then close.
    In finder I am left with-
    spreadsheet1
    spreadsheet1~
    "spreadsheet1" is the correct file and it works and functions normally, but "spreadsheet1~" is corrupt and I cant seem to delete it.  I always get "The operation can’t be completed because the item “spreadsheet1~” is in use.
    What is causing this and how can I get rid of those files?

    I think I would ignore the files and not worry about them.  Are you experiencing any undesirable effects of these files-- aside from seeing them there?

  • CRM 2013 - "Save and Close" button behavnig like "Save and New"

    Hi,
    I am working in CRM 2013. I have a scenario in which I am saving new opportunity product record through javascript and preventing original save of CRM. Save is working fine. After save, I need to refresh the screen. So I have used "Xrm.Utility.openEntityForm"
    to open newly created item in edit mode. When I click on "Save and Close" button on this new form in edit mode, instead of closing the opportunity product screen, it opens new entity form. So in short, after saving the record, if I click on "Save
    and Close", it behaves like "Save and New".
    Any one facing such issue?

    Save & Close seems to behave like the Save & "Back" Button, so the form tries to return to the new form, that was opened before.
    But I have no solution for this behavior...

  • Save and close InDesign file CS4 JS

    Hi, I need to save and close InDesign file after export pdf was done. Once export is complete the script opens the pdf file and the script gets interrupted. Here what I was trying and I am not sure if it even in the right direction:
    #targetengine "session"
    main();
    function main(){
        var myApplicationEventListener = app.eventListeners.add("afterExport",
        mySaveInDesign, false);
        var myDocumentEventListener = app.documents.item(0).eventListeners.add
        ("afterExport", mySaveInDesign, false);
        app.scriptPreferences.version = 6.0;
    var myEventNames = ["afterExport"] ;
    function mySaveInDesign(myEvent){
        var myDocument = myEvent.parent;
        saveInDesign ();
    function saveInDesign (){
        //myDocument.save(myDocument);
        app.activeDocument.save(myDocument);
        app.activeDocument.close(myDocument);
    Your help is highly appreciated.
    Yulia

    Save either takes no argument (equivalent to the File/Save menu option) or a file path, equivalent to File/Save As.
    So, your save commands aren't going to work as written. You either need just save(); or save(myDocument.fullName);
    Dave

Maybe you are looking for