popup

How can I detect if a browser is blocking a popup?

旧巷老猫 提交于 2019-12-17 02:08:28
问题 Occasionally, I've come across a webpage that tries to pop open a new window (for user input, or something important), but the popup blocker prevents this from happening. What methods can the calling window use to make sure the new window launched properly? 回答1: If you use JavaScript to open the popup, you can use something like this: var newWin = window.open(url); if(!newWin || newWin.closed || typeof newWin.closed=='undefined') { //POPUP BLOCKED } 回答2: I tried a number of the examples above

How to focus on JS popups in Firefox & IE?

倾然丶 夕夏残阳落幕 提交于 2019-12-14 03:59:01
问题 I've got a page that must open a popup window on another domain. When the link is clicked on the original page I'd liek it to focus on the new window if it's open, and open it if it's not. This code works in Chrome, but I get nothing for Firefox or IE. var win=null; function pop(){ if(win!== null && !win.closed) { //If it's already open, just focus on it win.focus(); }else { //Otherwise, make a new window and go to it win= window.open("http://google.com"); } }​ Demo here : http://jsfiddle.net

How to make a popup script with pure JS? [closed]

不羁岁月 提交于 2019-12-14 03:34:52
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I need to make a script in pure JS for showing an popup when the page is loaded. The background needs to be faded and i have to add my own content into the popup. I don't want to use CSS or HTML. Put the CSS and HTML into the Javascript code. Can someone help me with this? I can

How to turn off auto selection in combobox while navigating in dropdown?

天涯浪子 提交于 2019-12-14 03:18:46
问题 the Title states my problem almost completely. I have some combo box classes which derive from JComboBox, additionally we use the PlasticUI from JGoodies. My Problem is that when I navigate through the available items in the drop down popup those items are automatically being selected. This only happens when I use the navigation keys, hovering with the mouse over the objects is fine. In my case this is pretty bad because it somehow provokes the lazy-loaded data in the object to be loaded and

Java Textfield in PopupMenu

那年仲夏 提交于 2019-12-14 02:46:54
问题 I am trying to add a TextField to a PopupMenu in Java. (similar to Spotlight Feature in Mac OS X) But i can't add it to as an item because the PopupMenu only accepts MenuItem. Please help me. That's the code I currently have: import java.awt.AWTException; import java.awt.CheckboxMenuItem; import java.awt.Frame; import java.awt.Menu; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.event

Writing cookies via JavaScript

大兔子大兔子 提交于 2019-12-14 02:28:11
问题 I am using this code to open an html pop up, to which is wish to add a "don't show again" button that will store a preference in a cookie so that the pop up won't be shown again Why isn't it working? this is the line that should write the cookie: document.cookie = "dontShow=1; path=/; expires=Wednesday, 01-Jan-2020 12:00:00 GMT; domain=.qpcftw.co.cc"; Update: the problem is that the cookie isn't stored, and the "alert(document.cookie);" (see below) shows that the cookie is null (nothing is

Eclipse plug-in: How to create a new menu for eclipse plugin with key combination?

筅森魡賤 提交于 2019-12-14 02:27:38
问题 I've been looking about this question but I couldn't find it. I need to create a new "popup menu" and assign a key pressed (in other words, I need press "F3+right-click" (for example) and this action will be appear a new popup menu, with my actions in my workbench). I don't need a submenu for my right-click... i need a new and alone menu Example, in eclipse, when i right-click with my mouse over workbench I see a popmenu with: "undo, revert file, save, cut, copy..." and more, but i need

Javascript popups: Submit form, show “wait” screen for 5 seconds, then auto-close popup

落爺英雄遲暮 提交于 2019-12-14 02:24:55
问题 I have a popup that requires the user to fill out a form. Once the form is submitted, I need to take them to a "Waiting" screen inside that same popup while their info is checked. This is a prototype, so it only needs a delay of about 5 seconds as nothing is actually being checked. Then I'd like to close the popup automatically after that delay, instead of using window.close(); attached to a button. Here's the script I'm using: (edited to remove inline js) function centeredPopup(url,winName,w

Custom Wordpress Plugin - How do I insert content from popup on post editor?

这一生的挚爱 提交于 2019-12-14 02:22:37
问题 I've created my own plugin for WordPress, but it's not completely functional. My goal is to add an additional button to the Post Editor that allows you to insert an image (that you upload from your computer, and automatically gets modified after upload) into the post. When you click on the button, my popup that I created in my plugin shows up. I go through the upload process and the image is uploaded and modified. Now, how do I insert the image into the post? This is my code so far: function

UIReferenceLibraryViewController cannot be presented as popup (always covers full screen)

半腔热情 提交于 2019-12-13 21:59:37
问题 The following Swift 3 code (credit to Hacking With Swift) creates a UIAlertController and successfully presents it as a popup from a CGRect co-ordinate on iPad, via the UIPopoverPresentationController API: func popUpToSelectTheLanguage(){ let ac = UIAlertController(title: "Set expected language...", message: nil, preferredStyle: .actionSheet) ac.addAction(UIAlertAction(title: "English", style: .default, handler: { (action) in /* Action to take */ })) ac.addAction(UIAlertAction(title: "French"