Why closing a window in Indesign doesn't work?

I have a question about Indesign script.

Why it works, when you close a window as:

submitButton.onClick = function(){ close(); }

But when I try to perform a function thereafter as:

submitButton.onClick = function(){ close(); tagElements(); }

(I use the "a" tag, so no note window.close() is required)

The window does not close? I forget something here? Shouldn't the window close and then run the function?

The window is initialized as:

var de = new Window('dialog', 'Descriptions');

This is the model that I use:

  var ds = new Window('dialog');
   buttonnew = ds.add('button', undefined, 'submit');
   buttonnew.onClick = function(){
       ds.close(1);
   }
if(ds.show()){
  newwindow();
}

   function newwindow(){
   var de = new Window('dialog');
   buttonnew2 = de.add('button', undefined, 'submit');
   buttonnew2.onClick = function(){
       de.close(1);
   }
   if(de.show()){
     dosth();
}
}

function dosth(){
       alert('test');
   }

Tags: InDesign

Similar Questions

  • Why the rejection of multiple photos doesn't work anymore when you change pictures?

    Why the rejection of multiple photos doesn't work anymore when you change pictures? Does anyone else have this problem? It works on my other Mac but just stop working on my computer laptop pro, I have the latest OS and it worked until a few weeks ago. Thanks for any help!

    Selection of several photos at once enter "9" to reject all still works them for me in Aperture 3.6 on El Capitan.

    Have you tested, if the problem occurs only in an Aperture library or libraries opening?

    Create a new Aperture library to test and see rejection, so it works.

    If it does not work in a new library either, I got trash Aperture preferences.

    In preferences file is now in the container folder in the user's library.

    Try this:

    • Leave the opening runs.
    • Then open your user library and delete the folder complete ~/Library/Containers/com.apple.Aperture/
    • and the ~/Library/Preferences/com.apple.Aperture.plist file

    Your user library can still be hidden. To reveal the hidden user library:

    • Bring the Finder to the front by clicking on the desktop or the Finder icon in the Dock.
    • Select your folder user/home (with the House icon in the side bar of the Finder)
    • With this window in the Finder in the front window, press the ⌘J key combination to bring up the display options.
    • In the view options panel allow you to "show the library folder. That will make your visible user library folder in your folder.
    • Open your folder, then the library folder, then the containers.
    • Move the entire folder ~/Library/Containers/com.apple.Aperture on your desktop. Move the entire folder, not just the content.
    • Delete ~/Library/Preferences/com.apple.Aperture.plist as well.

    Now, restart the Mac, start Aperture and try see your book.  If all goes well, delete the folder on the desktop.

  • Windows Update link doesn't work is not in Windows XP Pro

    Hi all

    Something strange has happened and I don't know what.

    When I click on the 'Windows Update' shortcut I get a dialog box "Help & Support", that tells me that I am not connected to the Internet and an Internet connection is sufficient.  Well, I'm connected to the Internet and I can load IE and surf the web without any problem.  I can get to 'Windows Update' by clicking on 'Tools' then 'Windows Update', while that in IE, but the abbreviation of "Windows Update" no longer works.

    Does anyone have any ideas where I could look for problems?

    Thanks for any help,

    Charles

    Hello

    Thanks for the information.  I went ahead and continued to install windows updates.  After a couple more installs and restarts the 'Windows Update' shortcut has started working again.  I have no idea why, in fact, this is the first time I've ever seen this type of error.

    In any case, the WU shortcut works for now.

    Thanks for the help,

    Charles

  • Why Windows high contrast doesn't work anymore since Firefox 29 and the theme of the Australia?

    In firefox, 28 and all versions before that when I had Windows High Contrast active firefox would also be in high contrast. This would make black Web pages and all the text would become white. Because of my disability which makes it much easier for me to see and walk through it. Since firefox 29 and the introduction of the Australia theme but it seems like a high contrast in windows is no longer supported by firefox. That's why I went down to firefox 28 in order to be able to navigate as I used to.

    There is a hidden value that needs to be modified in two places:

    Go to Options > content > fonts look and colours, click on 'Advanced' > uncheck allow sites to choose the fonts and colors
    AND
    Click on ok and the color... on the content page > uncheck the allow pages choose own colors other than above. Make sure that the background is black and white choice policies.

    Under windows if you have high contrast mode, please also try "use system colors".

  • Why the Installation of Flash Player doesn't work with Chrome on Windows 7.

    My operating system is Windows 7, and I use the Chrome browser. When I was advised to upgrade Flash Player for vs. 17, I did. Problems occurred immediately. I tried the advice on the forums. This was not helpful.

    What I noticed, was that Flash Player 17 will not install on Vista, AND a claimed installation page information systems I used Vista! I've upgraded to Vista, but my operating system is Windows 7.

    I wonder how many others who have upgraded from Vista face the same problem.

    I. V.

    chrome has a built-in flash, the Flash Player with Chrome drive

  • Error 1053 and error 1068, I have no sound, No Security, Windows Update does not work, Windows Media Player doesn't work, restore the system no. said Volume Shadow Copy 0 x 81000202, please someone help me, Windows Vista Home Premium 32-bit

    My system does not work properly.  Something has closed most of my Windows programs.  How it happened and why I don't know.  I can not do that more with Microsoft.  First it was XP, Vista now.  It's like as soon as Windows 7 is out Microsoft has launched programs to destroy Windows Vista.  I have to deal with that now.  Please if anyone sees this and can help, please help me!

    Hello eco123eco,

    1. click on Start, click principally made programs, Accessories, right-click on command promptand select run as administrator.

    2. click on continue or provide credentials admin if prompted.

    3. in the command prompt window type the following, sfc/scannow (yes he's a space after sfc), and then press ENTER. This analysis may take some time to complete.

    Hope this helps you. Let us know anyway. Make it a great day!

    "And in the end the love you take, is equal to The Love You Make" (The Beatles last song from their latest album, Abbey Road.)

  • Show contents of window while dragging doesn't work, XP Pro SP3

    The option to display transparent versions of file icons when they are dragged in a different window is no longer works in my XP Pro SP3 installation.  "Control Panel-> system-> Advanced-> Performance settings-> see the window contents while dragging" is selected and remains selected after restarts.  The HKEY_CURRENT_USER\Control Panel\Desktop\DragFullWindows registry entry is set to 1 and the remains after restart.  This is a Dell computer, but I have no Dell Multimedia Experience installed, which is not the problem because it's with a lot of people.

    This setting has worked for years on this machine and work stopped for no apparent reason a few days ago.  It works on another identical machine, which makes things even more strange.  What could possibly happen?  Thanks for any help you can give.

    In case anyone has the same problem and comes across this, I managed to solve this problem (and the infamous 100% of svchost CPU problem) by applying this fixit. I have no idea why this fixit has something to do with "show window content while dragging", but it worked.

    Moreover, this forum software is atrocious.  I can't mark my answer as the answer just because I wrote it?

  • My windows live essentials doesn't work anymore since I installed the beta version, is there a way I can uninstall the beta version and revert to the original?

    I always get the message "windows live essentials stop working and must be closed.

    I always get the message "windows live essentials stop working and must be closed.

    Problems Windows Live are supposed to be redirected to Windows Live Solution Center. That's what I'll do.

    Here is the link to Essentials installer Solutions - How to uninstall Windows Live Essentials :
    http://windowslivehelp.com/solution.aspx?SolutionID=64db5c80-85E4-49fe-BF07-cb08ffc5dd53

    Here is the link to ask questions on the Essentials installer:
    http://windowslivehelp.com/forums.aspx?ProductID=12

    Good luck.

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Mapping to a network in Windows 7 drive doesn't work at home location but works at the location of the Office

    Hi all

    I think that the title also my problem that I'm having now. I don't know if I have to install or remove additional security stuff in order to have the mapping network drive work in my home region. No matter how many times I tried to map a network drive that is host to somewhere in the United States as a dedicated server running Windows Server 2008, home to my laptop it keeps popping "Path not found" error message, but when I'm at the Office I am able to map the network drive with the same computer laptop and office network is not the area with dedicated server they are different network.
    Y at - it an idea why and how to solve this problem?
    Thanks in advance
    Sam.

    Hello

     

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

     

    I hope this helps.

  • Windows 10 install doesn't work not after reboot (works fine until the PC is rebooted).

    It's bad enough. Upgrade to windows 10. Wanted to ensure that I started with a clean slate, so I have uninstalled FireFox, and then use the new edge of Windows browser to download the latest version of FireFox.

    He moved very well, remembers my bookmarks and settings, etc. Everything seems fine.

    But after a system restart, the FireFox icon on the desktop and the taskbar are just blank page icon, and when you try to run the program it says it cannot be found, or that I don't have permission to run it.

    Let's not get too hung up on how the bad error message is (go, Windows, who is?), the problem is that a program that worked very well until I rebooted now is not found or all of a sudden, I don't have permission to run it?

    The problem is if I try to boot from the desktop shortcut or if I go directly into C:\Program Files (x 86) \Mozilla Firefox and double-click on Firefox.exe.

    I tried the things:

    1. check the properties of the installer to download stub (Firefox Setup Stub 40.0.3.exe). I noticed that it was reported as a program that had been downloaded on the Internet and could be 'blocked '. So I checked the 'Unlock' button Did an uninstall, and then run Setup again. Everything is fine. Restart - same problem.

    2. check the properties of the installer to download stub (Firefox Setup Stub 40.0.3.exe). I noticed that there are two weird entries 'unknown user' in the settings of security with a sort of GUID. I removed those two. Did an uninstall, and then run Setup again. Everything is fine. Restart - same problem.

    3. do you have an uninstall, and then run the installer as administrator (after making the above changes). Everything is fine. Restart - same problem.

    I'm out of ideas.

    A diagnosis by a Microsoft technician during a support chat session!

    If you want to do a clean install of FireFox on your Windows machine after upgrading to Windows 10, but you had FireFox installed on Windows 7 or Windows 8 before the upgrade, you must uninstall the TWO FireFox and install the service of Maintenance of Mozilla before performing cleaning.

    If you uninstall FireFox but not the service of Maintenance of Mozilla, you will get the squirrels I described, where FireFox stops working after a reboot or a disconnection / connection.

    I think this is related to the BS that Microsoft introduced with Windows 10 where, after installing FIreFox, if you click on the button that says that you want FireFox to be your default browser is not only to persist this setting directly. Need you to the configuration screen of Windows 10 for default programs, which is not at all intuitive, especially those based on past behavior.

    I think that FireFox should put an explanatory text (on the page where you click on the button to make FireFox the default browser) which explains what Microsoft is up to.

    plan to install FireFox on Windows 10 machine

  • Why my menu and the toolbar doesn't work under Mozilla Firefor 7?

    My drop-down menu that has File, Edit, View, history, bookmarks, Yahoo, tools and help does not work, I can not print even this browser. The toolbar that comes with the installation of mozilla firefox is not no longer works.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    Safe mode disables extensions in Firefox 4 and later versions, and disables hardware acceleration.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.
  • Windows product key doesn't work is not for the reinstallation of Windows 7

    So my Lenovo (B560) became super slow and I want to wipe the hard drive and reinstall Windows 7. But when I looked on the Microsoft Web site and tried to check my key I received the following message is displayed:

    "The product key you have entered seems to be the software that was preinstalled by the manufacturer of the device. Contact the manufacturer of the device for software recovery options.

    The product key that I used was the COA sticker under the laptop which was indeed different from one I receovered from the register. In any case, I tried both and none worked.

    Ideas for how can I proceed?

    You must install OEM Lenovo recovery disks or a recovery partition to use the key.

  • Code Windows XP disk doesn't work do not

    I replaced my hard drive on a Pavilion dv6000. When I went to reinstall the operating system using the Windows XP CD that was shipped with the computer, the validation code has not worked.

    Is it because I changed the hard drive?

    Can I get a new CD of Windows XP of HP?

    Thanks for your help

  • "Paste Art Here" in Windows Media Player doesn't work sometimes.

    Original title:

    Troubleshooting 'Paste Art here' in Windows Media Player 11

    How to solve "Pulp Art" here in Windows Media Player 11?  I followed all the required steps and it works normally, but sometimes I do all the steps and absolutely nothing happens.  WHA Hoppen?

    Hello
     
    1. what prescribed measures followed?
    2. remember you of all changes to the computer before the show began?
     
    I suggest to try the steps in the following article and check.
    You cannot view, add, or delete items in the library of Windows Media Player 11
     
    Let us know if it helps!
     
  • Windows Media Player doesn't work when I plug my MP3 player or flash drive into any USB port.

    Victorinox original title: Media player closes on MP3 device.

    Recently WMP gives me the message "a problem has been...". "When I plug my MP3 player or flash drive into any USB port.  Then it crashes and I have to close it manually.  Any ideas?

    Hello

    1. have you done any hardware changes or software on your computer before this problem?

    2. what version of Windows Media Player do you use?

    3. What is the full error message that you receive?

    I suggest you to rebuild the database from the Windows Media Player library. Subsequently, check if the problem persists:

    If you use Windows Media Player 11, refer to this link: you cannot view, add, or delete items in the library of Windows Media Player 11

    Hope the helps of information.

Maybe you are looking for

  • Hasselblad H5D - 50 ° c

    I recently received a Hasselblad digital back (Hasselblad H5D - 50 ° c). And while this return is listed as a camera compatible and must be supported from digital camera Raw Compatibility Update 6.04, .fff files leads to constant of the two crashes t

  • Whenever I search screen safari goes back to the home screen

    When you try to search the web in the safari bar, the display returns to the home screen

  • Blocker popup disabled but still get a message saying windows blocked popup

    Original title: popups blocker I disabled my popup blocker, but I always get a message saying blocked popup window. I've added the address of the page to the list of allowed sites, but same result

  • DeskJet 3050 a j611g do not print

    I just had my pc hp pavilion dm4-2070us having deleted malware and now I can no longer print wireless from this pc. I uninstalled and reinstalled the printer driver at least a dozen times over the 3 days, run resolve this problem, use the HP print an

  • Dell XPS 12 9 33 con Windows 10 Testo sfocato Q

    Salvo last week a seguito di UN sistema del ripristino, ho reinstallato windows 10. MI è sorto pero' it problema che it testo in some maschere di windows e some programs risulti sfocato. Ho aggiornato I have e drivers it problem persists. The imposta