closure of a custom window

Is there anyway to close one window Indesign other than using this feature:

var myDialog is new window ("dialog", "to the list of offers");.

var myButtonGroup = myDialog.add ('group');

myButtonGroup.alignment = 'center ';

OK var = myButtonGroup.add ('button', undefined, 'OK');

cancel the var = myButtonGroup.add ('button', undefined, 'Cancel');

filter var = myButtonGroup.add ("button", undefined, "Filter");

filter.onClick = function() {}

myDialog.close ();

buildFilterWindow();

}

If (myDialog .show () is true)

{

processOffer();

}

on the other

{

Exit();

}

It's OK for a window that has only an OK and CANCEL but I have a third button that should close this window and create a different window. In the next window when I press OK it gives me the error "cannot process the request because a modal dialog box or the alert is active.. However, if I put the functionality of my third button in the OK button then the original window closes properly and my other windows features works without giving me the error. It is therefore clear that the orginal window is not closed correctly when you click on the button of my third.

Hello Duffy,

Unfortunately, solution by csm_phil does not correctly or the other.

Here's the working solution:

var win = new Window('dialog', 'From the list of offers');
var myClickButton = win.add ("group");
with (myClickButton){
    var myOkbutton = myClickButton.add ("button", undefined, "OK", {name: "OK"});
    var myCancel =myClickButton.add ("button", undefined, "Cancel", {name: "Cancel"});
    var myReset = myClickButton.add ("button", undefined, "Filter");
}

myReset.onClick = function () {
    win.close(3);
};

win.center();
var myRet = win.show();

switch(myRet){
    case 1:
        alert("You clicked OK");
        processOffer();
        break;
    case 2:
        alert("You clicked Cancel");
        break;
    case 3:
        alert("You clicked Filter");
        buildFilterWindow();
        break;
}

function buildFilterWindow(){
    alert("buildFilterWindow()");
}

function processOffer(){
    alert("processOffer()");
}

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Tags: InDesign

Similar Questions

  • Update Windows ALWAYS fails after a reinstalled (CUSTOM) Windows 7 reformat

    I often need to fix a PC by performing a custom Windows 7 reinstall.  Even more now that Windows 10 is itself by pushing on the users and do not restore to Windows 7.  Absolutely 100% of the time, regardless of 32-bit or 64-bit, Prem Home or Pro, Windows updates ALWAYS fail.  I run said repair tools he solves problems 2 and it still does not work.  ALL help topics are not relevant, just the hard disk was formatted, no other software has been installed, no firewall or language problems.  Material is not relevant it accomplishes this task on 20 for 20 different computers in a row.

    You could look into this,

    https://blogs.technet.Microsoft.com/windowsitpro/2016/05/17/simplifying-updates-for-Windows-7-and-8-1/

    It is expected by M$, we must now jump through hoops to clean install.

    http://www.ZDNet.com/article/sticking-with-Windows-7-the-forecast-calls-for-pain/

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-update/Windows-Update-remains-at-checking-for-updates/ff3c442e-79a6-40d3-AC35-29e130cebef1

  • When to start the windows 7 no sound is detected, but after the closure of the session window detects sound.

    When to start the windows 7 no sound is detected, but after the closure of the session window detects sound.

    Hello

    Thank you for the question to Microsoft Community. I'll give my best to help you.

    1. don't you make changes to the computer before the show?
    2. are you referring to the startup sound?
    3. What is the brand and model of the computer?

    I suggest you try the steps from the following link:

    Tips for solving common audio problems
    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems

  • Custom window question

    Hi all - out of curiosity, what languages is the showcase Adobe DPS support? It will support HTML5? Are there limitations to what you can and can't do in this custom showcase?

    Hi, I'm not a developer myself, but yes, it supports HTML5.

    You can get additional responses from other users, but in the meantime, please consult the following documents to get started:

    Build a custom showcase | Adobe Developer Connection

    and the page of generic Devnet for Digital Publishing on custom windows: libraries and showcases Custom | Adobe Developer Connection

    Hope that helps

  • custom Windows 7 Pro installation

    I did a custom installation of Windows 7 and now my computer does not detect Hp. Where and how can I get the Hp programs and drivers to get my computer get get recognized by the detecter.  And programs such as hp Advisor and pc doctor to work. I can't do an update when I installed windows 7 pro, because you can not switch to Vista Home Edition to windows 7 pro.  Iwent to the HP support page and put in my computer HP pavilion M8120n mediacenter name and requested updates of programs and I got has been updated litescribe. Can someone help

    OK, let's see what we can find...

    First, install the Intel chipset driver and restart.

    http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=20019&lang=eng&OSVersion=Windows%207%20(64-bit) * & DownloadType=.

    Next is the driver for the graphics card from nVidia in your PC.

    http://www.GeForce.com/drivers/results/56378

    Audio: Accept the agreement. Download and install the 2nd driver on the list.

    http://www.Realtek.com.tw/downloads/downloadsView.aspx?langid=1&PNid=24&PFID=24&level=4&Conn=3&DownTypeID=3&GETDOWN=false

    Network: 64-bit is the second listed file.

    http://downloadcenter.Intel.com/Detail_Desc.aspx?agr=Y&DwnldID=18713&lang=eng&OSVersion=Windows%207%20(64-bit) * & DownloadType = drivers

    TV tuner card: I think that's the one you need...

    http://h20000.www2.HP.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&swItem=VC-78151-1&mode=4&IDX=0&prodTypeId=321957&prodSeriesId=3688868

    If your PC needs all the other pilots, please click on any device with the small yellow! mark and view the ID of the hardware for it.

    If you don't know where to find the hardware ID, please read the info on the link below.

    http://www.DeviceDriverFinder.com/blog/device-drivers/how-to-check-the-hardware-ID-for-a-Windows-device

  • Problem installing KB980408 - set up the parameters for custom: Windows Desktop Update

    After installing KB980408, the computer restarts, goes through the normal boot process, displays the Windows logo, and then goes to a black screen with a window:

    Custom settings

    Implementation of the custom settings for:

    The Windows Desktop Update

    and stay on it indefinitely (4 + hours so far). Moving the mouse on the screen shows the circular cursor "wait", and I am able to move the window around; I am also able to start the Task Manager and restart, but that's all.

    So I thought another reboot may solve the problem, but it doesn't... it keeps just hung to this window.

    No matter who else affected by it, or have solutions to try?

    I had this same problem on both machines. During his connection, this behavior began immediately after the KB980408 update has been installed. The solution I found is to ctrl + alt + delete, start taskmgr and kill the task of custom settings. Then you have to manually run explorer.exe (file--> Run--> Explorer.exe) and windows should load as usual. The next time that I rebooted and logged in Windows loaded as usual. I'm guessing that this problem is a "run once" task. However, updates are not supposed to make your computer more stable?

  • Active Directory and domain controller on old customer Windows 2003 and Windows 7.

    Hi all

    I have Active Directory and the domain on old Windows 2003 and Windows 7 client controller. I enabled "User must change password at the next logon" for the customer user on AD account.

    When the user tried to connect to Windows 7, after that they have got the change password screen and type new password, then they received message "the user password must be changed before logging on the first time," user get password screen change again, then they get the same massage. Looks like he's going to loop and user cannot change password and connect to the computer.

    Hello

    To help you with your concerns, you can see the article below:

    Error message: the password must be changed before logging on the first time

    Let us know how it goes.

  • Impossible to install custom Windows 7 like drive not detected

    Hello! I have a problem with my installation of windows, I can't select partitions because s does not exist. Only see the drivers are my usb device and start: (...) I tried to format the partition with cmd but does not score was only 3600 MB (my usb memory), and I deleted my windows! any suggestions? THX

    Original title: installation of Windows 7

    Hello

    Sorry for the delay in responding,

    Thanks for the update and send the screen shot for the same thing. According to the screen shot, it seems that you have chosen the wrong option (Ex - like load a driver) because you do not receive the displayed records.

    Please follow the steps below and check if it helps.

    (A) start the computer from your Windows 7 installation DVD.
    (B) when you are prompted, Press any key to boot from the installation DVD.
    (C) select your language preferences and click on the Next button.
    Click the install button to start the installation.
    If you did step 1, then uncheck the I want to help make Windows installation better area (unless you want), and then click the go online to get the latest updates for installation option.
    If you did step 1, Windows 7 will now check online and install the available installation updates.
    Check I accept the license terms box, and click Next.

    Click (Advanced) custom option. (See screenshot below)

    Select the hard drive or partition for the installation of currently installed Windows you want to install Windows 7 on and click on the Next button.

    Click OK.

    Windows 7 installation will now begin.

    It will be useful,

    Concerning

  • Question about action customized Windows install

    Hello

    We must decide whether to use the DLL and the VBScript in the custom action.  I know to run a custom action, the user requires administrator on the local computer.  Just amazing DLL and VBScript require different privileges to run.  A reference link would be appreciated.

    Thank you much in advance.

    Puyo

    Hi Puyopuy,

    I understand you want to learn about Windows Installer with VBScript executing in the custom action. I'll be happy to help you with this problem.

    It is better suited for the IT audience Pro on MSDN. Please ask your question in the MSDN Support Forum. You can follow the link to your question:
    http://social.msdn.Microsoft.com/forums/en-us/categories

    For reference:

    Windows errors install 2738 and 2739 with Script Custom Action
    http://blogs.msdn.com/b/heaths/archive/2007/05/31/Windows-Installer-errors-2738-and-2739-with-script-custom-actions.aspx

    To do: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    How to back up and restore the registry in Windows?
     
    I hope it helps. If you have problems in the future, please let us know. We will be happy to help you.
  • Messages appear is not on the Console in the form of Custom window

    @@We has created a custom form with the name of the window: XXACCOUNTDESC

    Form module: XXACCOUNTDESC

    Subclass: Module

    Console Window: PROGRESS_INDICATOR.

    during the compilation of the form, we get the error message with

    FRM-18108 could not load the following items.

    Source Module: APPSTAND

    Source object: STANDARD_PC_AND_VA

    Source Module: APPSTAND

    Source object: STANDARD_TOOLBAR

    Source Module: APPSTAND

    Source object: STANDARD_CALENDAR

    Even if we get this error. Form is created successfully and we can open the form for application front-ends.

    Everything works fine but it does not display a message on the console at the bottom of the form window.

    Please let me know what I missed.

    Thanks /.

    User526853 wrote:

    ... I have another question. I wanted to hide the error message standard oracle on the form and show the custom for this message I put: SYSTEM. MESSAGE_LEVEL: = '25'...

    Do not delete the message using: SYSTEM. MESSAGE_LEVEL: = 25.  You might find yourself Gohan messages you want to display, and more that only works for messages that have a lower priority or level of 25.  Any greater than 25 message always appears.  It's much better to intercept the error message / in the trigger-Error or one Message only to remove the error.

    You should be able to intercept the message in the On-Error trigger.  Simply add the code to test the exception DUP_VAL_ON_INDEX (ORA-00001) and display your message elsewhere, let BSE standard Error Handler take care of all other errors.  Your code should look like this:

    /* Sample On-Error Trigger */
    -- Code is untested...
    BEGIN
       IF ( DBMS_ERROR_CODE = -1 ) THEN
           -- Display your message here
       ELSE
           -- Call the standard EBS Error Handler
       END IF;
     END;
    

    Craig...

  • Stores custom Windows 8.1

    Hello

    My company is working fidgets a DPS app pre-existing Windows 8.1 and this by using our custom shop (derived from 'View with customized tabs' Configurator of DPS).

    Complete successful construction, but when we run the application on the Windows 8.1 PC desktop, it starts, appear loading but after that nothing, demand can be reduced to the icon on the menu bar.

    We have tried to also use custom store unmodified default 'View with custom tabs' or 'Custom library view' (always in the Configurator of DPS) but get us the same wrong result, rather "iPad combined library and store" appear works (even if the layout is a little evil).

    There are specific requirements for Windows devices? How is possible to use previously configurations?

    Thank you and best regards.

    Giuseppe

    Hi, Giuseppe.

    The last time that you created the application Windows? We had a handful of last release patches to resolve some problems with windows on Windows. If you have not built the app recently I suggest try again see if that fixes it. If this isn't the case, please contact the assistance company's support.

    Neil

  • Incorporate the reader in a custom Windows application

    I apologize if this has been covered in another post.  I spent an hour looking for this answer and could not find what I was looking for.

    In any case, I'm trying to bounce some ideas around a custom application that I build inside Windows (Windows 7).  I'll be wrtiitng in c# and it will essentially be a hybrid of project management software and CRM for a very small business.  The projects would not have PDF documents get digitized as well as the product digitallly.  I'm curious to know if there is a robust way to embed a PDF Viewer inside my application.  Some of the PDF will have several pages inside of them so I would like the ability to display/thumb through several pages.

    I'm fairly certain that this is possible, but I'm not sure where to look to see how to do it via the Adobe API.  Any help would be appreciated.

    You can use the Acrobat SDK forum.

  • Don't follow not header resets itself after the closure of the Preferences window.

    I would like to have my header set do not follow to "don't follow do not." However, Firefox resets this header to "Don't tell sites anything about my preferences of follow-up" every time I close the preferences window. There is no 'save' button, so I guess that the settings are automatically saved.

    You can check the pref (s) . privacy.donottrackheader * on the topic: config page.

    • Privacy.donottrackheader.Enabled (true)
    • Privacy.donottrackheader.Value (1)
  • The closure of many application windows unexpectedly quit without the application itself.

    Whenever I asked several windows open on my iMac, one or all windows frequently and unexpectedly close. Does not close the application itself, but the screens disappear.  I can reopen it the windows in the dock or by command-tab.  It is not a question of active corners, shortcuts, etc.  The windows, that I don't use sporadically close while I am engaged in another window.  VERY interruption.  Any ideas?

    As the elements are always there when you command-tab, it looks like you accidentally select "Hide others" (option-command-H).

  • What is the best way to create a custom Windows XP slipstreamed CD so that I can install fees and be perfectly up-to-date on security updates at the end of the installation?

    I have Windows XP SP3 OEM CD. I want to use to create a 'new' Windows XP OEM CD slipstreamed which would include at each update published security for XP since Service Pack 3. After researching this project for a bit, I noticed that an unholy amount of security updates have been released since Service Pack 3. My main question is how can I get all these security updates without having to monotonous download each individually? Or is this the only way? Is there a website that is legitimate and can be trusted who was respected and compressed these updates of security in a single file that can be downloaded? How can I incorporate these security updates? It is even possible to integrate these security updates or would they simply be performed one after the other during the installation of Windows XP?

    System configuration: Winndows 7 RTM, Gigabyte GA-EP45-UD3L motherboard, Intel Pentium Dual - Core E6300 Wolfdale 2.8 GHz, 4 GB of memory PC-1066 DDR2 Patriot Viper, 500 GB Western Digital hard drive, GeForce 8800GT Videocard

    Click here and discover the info, it's the best out there

    http://unattended.MSFN.org/unattended.XP/

Maybe you are looking for

  • Download imessage on my mac

    I wasn't able to figure out how to get imessage to appear on my macbook. When I open messages on my macbook I can't find how to do to continue the discussions started on my iphone. I watched tutorials in the forums... but it seems that I do not have

  • error message (code 19) in the registry relating to the CD /DVD driver

    Laptop doesn't have CD/DVD. Cannot load / reinstall the driver by mistake in the register (code 19).  just installed SP2 for Vista. This has caused the problem.  Uninstalling this device does not seem to solve the problem?

  • INTERFACE with the waterfall design: how 2 controls arranged in a single line?

    Hi all Cascade using I can easily drag and drop the control in the definition of qml and can preview visually. But it seems to draw the controls row-by-row. How do control the position absolutely on one line?

  • Download of CC on multiple devices

    Is it possible to download the cc on a second computer? I think more precisely a situation in which I want to buy a new PC in the middle of my CC plan. In such a situation, how can I download CC on the new PC?

  • Expression box

    If the 3 following rules gathered and want to return to 'Y' of another "n" to a result column called BREACHED_IND I used an EXPRESSION BOX below and would like to know what is more, if the best alternative to do this. This is a large table. With the