- Pop-up Windows
- Parent Window
- Child Window
- Opening the Pop-up Window
- Closing the Pop-up Window
- Passing Values Back to the Parent Window
- Automatically Setting and Retrieving Values
- Manually Setting and Retrieving Values
- Popups and window methods
- Popup blocking
- window.open
- Example: a minimalistic window
- Accessing popup from window
- Accessing window from popup
- Comments
- Pop-up windows to add accounts not showing up
- Replies (4)
- What to do if pop-up window won’t go away on Windows 10
- 8 solutions to remove stubborn pop-up windows
- What you can do if pop up window won’t close
- Solution 1: Force-close the pop up window
- Solution 2: End background process
- Solution 3: Reboot your computer
- Solution 4: Use Windows’ built-in maintenance function
- Run a System Scan to discover potential errors
- Solution 5: Restore your system to an earlier time
- Solution 6: Use Malwarebytes or Adwcleaner
- Solution 7: Install Windows Updates
- Solution 8: Uninstall & reinstall programs
- Conclusion
Pop-up Windows
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Many tasks in Enterprise Portal are performed in modal windows that are opened from list pages. The URL Web Menu Item used to open the page indicates whether the page is displayed in a modal window. This is the preferred way to use modal windows in Enterprise Portal for Microsoft Dynamics AX 2012.
In Microsoft Dynamics AX 2009, if you wanted to display information or have the user perform a task in a separate window, you had to use a pop-up window. A pop-up window is another web browser window that appears on top of the main Enterprise Portal window. Pop-up windows like this can still be used in Microsoft Dynamics AX 2012.
Parent Window
The parent window is the page in Enterprise Portal from which the pop-up window is opened. The parent window must contain a User Control that has the AxPopupParentControl component. Properties for this component allow for you to specify characteristics of the pop-up window. For example, the PopupHeight and PopupWidth properties control the size of the pop-up window.
Child Window
The child window is another page in Enterprise Portal that will be displayed in the pop-up window. It must have a URL Web Menu Item defined that points to the page. For details about how to create a web menu item, see How to: Create Web Menu Items.
The page used for the child window will typically contain a User Control that has the AxPopupChildControl component. This component is used when closing the pop-up window. It is also used when passing values from the pop-up window back to the parent window.
Opening the Pop-up Window
To open the pop-up window, use the OpenPopup method provided by the AxPopupParentControl. This method is typically called from the code for a User Control on the parent page. The OpenPopup method has one parameter, which specifies the web menu item of the page to be opened and displayed in the pop-up window.
The following example is the code for a button that was added to a User Control. The User Control contains the AxPopupParentControl component. An AxUrlMenuItem object is created that specifies the page to open in the pop-up window.
Closing the Pop-up Window
The user can close a pop-up window by clicking the close box. The pop-up window can also be closed through code for a User Control in the pop-up window. The AxPopupChildControl provides the ClosePopup method. This method requires two boolean parameters. The first specifies whether field values must be passed from the pop-up window back to the parent. The second parameter specifies whether the parent page has to post back after the pop-up window closes.
If the second parameter of the ClosePopup method is set to true, the PopupClosed event for the AxPopupParentControl will be run when the pop-up window closes. You can use the method handler for this event to retrieve values that are passed back to the parent from the pop-up window.
Passing Values Back to the Parent Window
It is often useful to pass values from the pop-up window back to the parent window. The AxPopupParentControl and AxPopupChildControl provide a collection of AxPopupField objects for this purpose. This collection is accessed through the Fields property for the component. This property provides access to the AxPopupField Collection Editor.
You will use the AxPopupField Collection Editor to create the collection of field values to pass from the child window back to the parent window. Each AxPopupField object in the collection has a Name property. It also has an optional Target property which maps the field to a control on the page. The names of the AxPopupField objects in the collection must be the same for both the AxPopupChildControl and the AxPopupParentControl. For instance, assume the AxPopupParentControl had the following set of AxPopupField objects defined:
The AxPopupChildControl must have AxPopupField objects that have the same names defined for its Fields collection. The names enable the fields to be matched as they are passed from the child back to the parent.
The values of the AxPopupField objects can be set or retrieved automatically. They can also be set or retrieved manually through code for the User Control.
Automatically Setting and Retrieving Values
If you have set the Target property for an AxPopupField object for the AxPopupChildControl, it is mapped to a field for the User Control. In the pop-up window, Enterprise Portal will automatically set the AxPopupField object value to the value that is contained in the field specified by the Target property. If you have set the Target property for the AxPopupField object for the AxPopupParentControl, the value passed back for this field from the pop-up window will automatically be retrieved and put in the mapped field.
The field specified by the Target property must be within the same naming container as the User Control, or any parent container in the hierarchy. The field must also have the Value client-side property.
Manually Setting and Retrieving Values
If you have not set the Target property for the AxPopupField objects, you can set their value manually through code in the pop-up window. Use the SetFieldValue method to do this. You can also use code in the parent window to retrieve the value of each AxPopupField object. Use the GetFieldValue method to do this.
You cannot set or retrieve an AxPopupField object value through code if you have used the Target property to map it to a field.
For example, the following is code for a button that is contained in the User Control displayed in a pop-up window. When the button is clicked, the two AxPopupField objects defined in the Fields collection have their values set. Then the pop-up window is closed.
Code for the PopupClosed event on the parent window is typically used to retrieve the values passed back from the pop-up window. The following example shows the code that retrieves the values returned by the previous example.
Popups and window methods
A popup window is one of the oldest methods to show additional document to user.
Basically, you just run:
…And it will open a new window with given URL. Most modern browsers are configured to open url in new tabs instead of separate windows.
Popups exist from really ancient times. The initial idea was to show another content without closing the main window. As of now, there are other ways to do that: we can load content dynamically with fetch and show it in a dynamically generated
Also, popups are tricky on mobile devices, that don’t show multiple windows simultaneously.
Still, there are tasks where popups are still used, e.g. for OAuth authorization (login with Google/Facebook/…), because:
- A popup is a separate window which has its own independent JavaScript environment. So opening a popup from a third-party, non-trusted site is safe.
- It’s very easy to open a popup.
- A popup can navigate (change URL) and send messages to the opener window.
Popup blocking
In the past, evil sites abused popups a lot. A bad page could open tons of popup windows with ads. So now most browsers try to block popups and protect the user.
Most browsers block popups if they are called outside of user-triggered event handlers like onclick .
This way users are somewhat protected from unwanted popups, but the functionality is not disabled totally.
What if the popup opens from onclick , but after setTimeout ? That’s a bit tricky.
The popup opens in Chrome, but gets blocked in Firefox.
…If we decrease the delay, the popup works in Firefox too:
The difference is that Firefox treats a timeout of 2000ms or less are acceptable, but after it – removes the “trust”, assuming that now it’s “outside of the user action”. So the first one is blocked, and the second one is not.
window.open
The syntax to open a popup is: window.open(url, name, params) :
url An URL to load into the new window. name A name of the new window. Each window has a window.name , and here we can specify which window to use for the popup. If there’s already a window with such name – the given URL opens in it, otherwise a new window is opened. params The configuration string for the new window. It contains settings, delimited by a comma. There must be no spaces in params, for instance: width=200,height=100 .
Settings for params :
- Position:
- left/top (numeric) – coordinates of the window top-left corner on the screen. There is a limitation: a new window cannot be positioned offscreen.
- width/height (numeric) – width and height of a new window. There is a limit on minimal width/height, so it’s impossible to create an invisible window.
- Window features:
- menubar (yes/no) – shows or hides the browser menu on the new window.
- toolbar (yes/no) – shows or hides the browser navigation bar (back, forward, reload etc) on the new window.
- location (yes/no) – shows or hides the URL field in the new window. FF and IE don’t allow to hide it by default.
- status (yes/no) – shows or hides the status bar. Again, most browsers force it to show.
- resizable (yes/no) – allows to disable the resize for the new window. Not recommended.
- scrollbars (yes/no) – allows to disable the scrollbars for the new window. Not recommended.
There is also a number of less supported browser-specific features, which are usually not used. Check window.open in MDN for examples.
Example: a minimalistic window
Let’s open a window with minimal set of features, just to see which of them browser allows to disable:
Here most “window features” are disabled and window is positioned offscreen. Run it and see what really happens. Most browsers “fix” odd things like zero width/height and offscreen left/top . For instance, Chrome open such a window with full width/height, so that it occupies the full screen.
Let’s add normal positioning options and reasonable width , height , left , top coordinates:
Most browsers show the example above as required.
Rules for omitted settings:
- If there is no 3rd argument in the open call, or it is empty, then the default window parameters are used.
- If there is a string of params, but some yes/no features are omitted, then the omitted features assumed to have no value. So if you specify params, make sure you explicitly set all required features to yes.
- If there is no left/top in params, then the browser tries to open a new window near the last opened window.
- If there is no width/height , then the new window will be the same size as the last opened.
Accessing popup from window
The open call returns a reference to the new window. It can be used to manipulate it’s properties, change location and even more.
In this example, we generate popup content from JavaScript:
And here we modify the contents after loading:
Please note: immediately after window.open , the new window isn’t loaded yet. That’s demonstrated by alert in line (*) . So we wait for onload to modify it. We could also use DOMContentLoaded handler for newWin.document .
Windows may freely access content of each other only if they come from the same origin (the same protocol://domain:port).
Otherwise, e.g. if the main window is from site.com , and the popup from gmail.com , that’s impossible for user safety reasons. For the details, see chapter Cross-window communication.
Accessing window from popup
A popup may access the “opener” window as well using window.opener reference. It is null for all windows except popups.
If you run the code below, it replaces the opener (current) window content with “Test”:
let newWin = window.open(«about:blank», «hello», «width=200,height=200»); newWin.document.write( «
Comments
- If you have suggestions what to improve — please submit a GitHub issue or a pull request instead of commenting.
- If you can’t understand something in the article – please elaborate.
- To insert few words of code, use the tag, for several lines – wrap them in
tag, for more than 10 lines – use a sandbox (plnkr, jsbin, codepen…)
Pop-up windows to add accounts not showing up
I have multiple apps that have this issue.
Pop-up windows won’t open in:
Bluetooth Settings when trying to add a device.
Adding an email account in Mail & Calendar.
Adding an account under Email & Accounts in Settings.
When trying to improve facial recognition for my Windows Hello webcam.
This seems to be a system-wide issue, clicking on any of these buttons literally does nothing!
I tried resetting my computer and it fixed it until installing the latest update, I think it broke my desktop.
EDIT: I made a small video on my issue that can be viewed here
Replies (4)
Hello, my name is Marco and I am an Independent Advisor. I will do my best to help you.
Let’s try the DISM and SFC commands first to check for corrupted system files.
Step to run the System File Checker tool (SFC.exe) (DISM)
Note: Respect the spaces or simply copy / paste the commands.
— Click on windows start button, type CMD
— Right click on » prompt command » and » run as admin «
— Now type this commands
DISM.exe /Online /Cleanup-image /Scanhealth
— Press Enter.
— Then, this command and Enter.
DISM.exe /Online /Cleanup-image /Restorehealth
— Then make the following commands.
sfc /scannow
When the scan is finished, check if there are any errors detected.
Restart the computer and check if it is now fixed.
What to do if pop-up window won’t go away on Windows 10
- Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues affecting your computer’s security and performance
- Restoro has been downloaded by 0 readers this month.
8 solutions to remove stubborn pop-up windows
- Force-close the pop up window
- End background process
- Reboot your computer
- Use Windows’ built-in maintenance function
- Restore your system to an earlier time
- Use Malwarebytes or Adwcleaner
- Install Windows Updates
- Uninstall & reinstall programs
Pop ups are relatively common features of Windows computers today. More often than not, a pop up serves as a notification or short cut on a computer’s screen, and this would normally go away on its own or simply by clicking exit. However, at times, due to a host of individual or combined factors, a pop up window won’t go away.
If you are having this problem, you are in the right place. This article is developed to proffer solution(s) to the pop window won’t go away problem.
Basically, pop ups are some kind of unsolicited messages or notifications from computer programs (system and installed programs). This is inclusive of web browsers like Chrome, Firefox and others programs that use the Internet. Most times, these pop ups request your approval or decline, and at times, it could constitute a lot of nuisance.
This becomes worse when a pop up window won’t go away, and no matter how hard you try, it just stares right back at you on your computer screen.
While there are many factors that could make a pop up window not to go away, the most significant of these factors is malware or virus attack, which disrupts computer system’s performance.
Other factors, which could be responsible for the pop up window error include incomplete installation of program(s), high CPU (frozen system), apps running in background, corrupt .exe files and more.
Nevertheless, this article has provided some of the best, proven, solutions to resolve this issue.
What you can do if pop up window won’t close
Solution 1: Force-close the pop up window
This is the basic method for shutting down a program, and it can also be employed to close a pop up window. To force-close a pop up window on your computer, simply press the Alt + F4 keys.
If a pop up window won’t go away as a result of a minor technical issue, then force-closing it should ensure it doesn’t show up again. However, if the error is caused by more severe factors like file corruption, system malfunction or malware attack, this method might be ineffective. In this case, you can try the next solution.
Solution 2: End background process
A program running in the background might become infected, thereby resulting in a pop up window that won’t go away.
To end such infected process, follow the steps outlined below.
- Press Ctrl + Alt + Delete
- Click the “Task Manager” icon.
- Select “Processes”.
- Right-click on an infected process and select “End process”.
If the pop up window won’t go away, try the next solution.
Solution 3: Reboot your computer
At times, a pop up window won’t go away from your home screen simply because of a minor system malfunction, which could range from clogged up files to a technical glitch. In this case, a simple reboot is usually the ultimate solution. System reboot automatically clears off temporary files from your computer, and this, most times, fixes the pop up window won’t go away error.
To reboot your computer system, simply restart it or outrightly power it down and power it up again. If this action fails to remove the pop up window, you can try the next solution.
Solution 4: Use Windows’ built-in maintenance function
This solution is specific to Windows users, who are having the issue of pop up notifications that won’t go away. Windows maintenance function should clear the notification pop ups from your screen.
Run a System Scan to discover potential errors
Follow the steps below to execute this function:
- Click on the “Start” button.
- In the search box, input the keyword – Control Panel and press “Enter”
- Navigate to the top right of your computer screen and locate “View by”.
- Change the default “View by” option from “Category” to either “Large Icons” or “Small Icons”.
- Click on “Security and Maintenance”.
- Select “Change Security and Maintenance Settings”.
- Navigate to “Maintenance Messages” and locate the “Windows Backup” checkbox.
- Uncheck the box.
- Save your changes by selecting “OK”.
- Reboot your computer system.
- After your computer has restarted, repeat the steps up to the sixth step.
- At the seventh step, under “Windows Backup” checkbox, check the box.
- Select “OK” and restart your computer.
Note: This process is specifically recommended on Windows 10. If, after trying this method, your pop up window still won’t go away, you can try the next solution.
Solution 5: Restore your system to an earlier time
System restore could be the ultimate solution to the pop up window won’t go away error. This is because; it restores your system to an earlier time, before the error.
To run a system restore, follow the steps outlined below.
- Click the “Start” button.
- Input the keyword “restore or system restore” in the space provided.
- On the pop up options, select “System Restore“.
- Click on “Next”
- Select “Next” again.
- On the displayed window, click “Finish”.
This action will automatically restart your system, and your computer will be restored to an earlier time; a day, two days or more. If the system restore process fails to permanently remove the pop up window, proceed to the next solution.
Solution 6: Use Malwarebytes or Adwcleaner
If a pop up window won’t go away, the most likely problem is virus or malware attack. Hence, the way to go is to run a scan and clear off malware, and viruses from your system. Two recommended tools in this regard are Malwarebytes and Adwcleaner. These tools will free up your system and remove the malignant pop up window from your screen.
You can try the next solution, in case the problem is not related to malware or virus attack.
Solution 7: Install Windows Updates
Installation of latest Windows update will improve the operability of your computer. As such, it will repair some corruptions on your computer system (even the pop up window won’t go away error).
Basically, Microsoft occasionally notifies users of new updates. However, you can check for updates and install them directly. To do this, follow the steps outlined below.
- Click “Start”.
- Type “Windows Update” in the searchbox and click Enter.
- Install all available updates (if any), by clicking on Select “Install Updates”.
- Wait for a couple of minutes for all the updates to install.
- After successful installation, Windows will automatically restart.
Installing all available updates on your Windows computer should remove the pop up window from your screen. If this process is ineffective against the pop up window error, you can try the next method.
Solution 8: Uninstall & reinstall programs
If a pop up window is associated with a corrupt or damaged app, the ultimate solution might be to uninstall the app (and reinstall it), provided all other options have been exhausted.
You can uninstall any program on your computer by following the steps below.
- Click the “Start” button.
- Tap on “Control Panel”.
- Select “Programs”.
- Under “Programs, click “Programs and Features“.
- Locate the affected app and click on it.
- Select “Uninstall” and let the process run.
- After uninstalling the program, you can download it again and reinstall it.
To uninstall a program on Windows 10, you can also follow the simple steps outlined below:
- Click on “Settings” and select “Apps”.
- Under “Apps”, click “Apps & Features“.
- Click on the affected/desired app or program.
- Click the “Uninstall” button
- Confirm the uninstall by clicking on the pop up “Uninstall” key.
- Follow the prompt command to complete installation
- Download & reinstall the program.
Conclusion
Pop ups are common occurrences on computer systems today, and they are especially common on systems with web browsers and internet connections. At times, a pop up window won’t go away no matter how hard you try to close it. This is caused by many factors.
In this article, we have compiled some of the best solutions to fix the pop up window won’t go away error on your computer system. Essentially, at least one of the above outlined solutions should permanently remove a stubborn pop up window from your computer screen.
RELATED STORIES YOU NEED TO CHECK OUT: