popup

How to make PopUp window in java

孤人 提交于 2019-11-27 21:53:13
I am currently developing a java application. I want to show a new Window which contains a text area and a button. Do you have any ideas? COD3BOY The same answer : JOptionpane with an example :) package experiments; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; public class CreateDialogFromOptionPane { public static void main(final String[] args) { final JFrame parent = new JFrame(); JButton button = new JButton(); button.setText("Click me to show dialog!"); parent.add(button); parent.pack(); parent.setVisible(true); button.addActionListener(new java

SugarCRM- How to get POPUP when click on Save button?

China☆狼群 提交于 2019-11-27 20:57:37
I want when click Save in Edit View of some module (example Contact) to get pop up with some message (later I will get options OK and Cancel on that pop up.). My function YAHOO.SUGAR.MessageBox.show({msg: 'Foo'} ); is working when I put it at top of editviewdefs.php (I also must include cache/include/javascript/sugar_grp_yui_widgets.js ) ) file and when opening that view I am getting that pop up. But I want it to popup on Save,not when opening EditView (this was just testing that showed me that YAHOO function is working). So I try to create seperate customJavascript.js file in custom/modules

Android pop-up menu with icons (similar to Google Map app version 6)

随声附和 提交于 2019-11-27 20:56:49
Does anyone know what component is used for the menu in the new version 6 of Google Map’s official app on Android? I’m trying to build a menu similar to that, couldn’t find anything in the official dev pages (Note: I’m targeting Gingerbread APIs, possibly with backward compatibility up to 1.6.) Here is the only picture I found of this menu (this is on ICS, but something similar is displayed on Gingerbread). Please have a look at the left screenshot here (from the Gizmodo site): If there’s no built-in component, what approach would you follow to build one? At worst, if no such component exist

Why does a WPF Popup close when its background area is clicked?

左心房为你撑大大i 提交于 2019-11-27 20:31:14
问题 I have a WPF Popup control that contains some editing controls (list boxes, text boxes, check boxes) laid out with quite a bit of whitespace. Popup.StaysOpen is set to False , which is required. If the user clicks elsewhere in the application, the editing operation should be considered aborted and the popup should close. Unfortunately the popup also closes whenever the user clicks within the background region of the popup (the space between the edit controls). I've tried setting the popup to

How to intercept and manipulate a Internet Explorer popup with VBA

旧时模样 提交于 2019-11-27 20:17:00
Language/Software: The language is VBA. The application is Access 2003 (I also can use Excel) and Internet Explorer (on Windows XP/Seven). The problem: I'm developing a Access macro which opens and manipulates a intranet site of the enterprise where I work. I can create new IE windows and fill data in the forms, but I need to be able of intercept and manipulate other IE windows, such as popups, which opens when I click on a link, when I choose an option of a select element or when the page is loaded. Here's some code I use to get an IE window from it's title. It's split into two functions

Prompt User before browser close?

好久不见. 提交于 2019-11-27 20:09:56
We have an administrative portal that our teachers constantly forget to download their latest PDF instructions before logging out and/or closing the browser window. I have looked around but can't find what I'm looking for. I want to accomplish the following goals: Goal 1 Before a user can close the browser window, they are prompted "Did you remember to download your form?" with two options, yes/no. If yes, close, if no, return to page. Goal 2 Before a user can click the 'logout' button, they are prompted with the same as above. My first pass at the very basic code (which does not work for

Prevent pop-ups from being blocked

半世苍凉 提交于 2019-11-27 19:31:12
I am using a Facebook login method in my code on page load, but when I execute this code, the pop-up blocker closes the Facebook permission window. How can I open this window with Javascript without needing to make an exception in the pop-up blocker? Below is my code: FB.login(function(response) { if(response.session!=null) { window.location.href='http://example.com'; } }, { perms: 'email,user_birthday,publish_stream' }); You can do something like - var uri = encodeURI('http://example.com'); FB.getLoginStatus(function(response) { if (response.status === 'connected') { window.location.href=uri;

Javascript detect closing popup loaded with another domain

≯℡__Kan透↙ 提交于 2019-11-27 18:23:32
I am opening a popup window and attaching an onbeforeunload event to it like this: win = window.open("http://www.google.com", "", "width=300px,height=300px"); win.onbeforeunload = function() { //do your stuff here alert("Closed"); }; If I leave the URL empty, the new popup opens with "about:blank" as the address but when I close it, I see the alert. If I open in as you see it (with an external URL), once it's closed, I cannot see the alert anymore. Any idea why this is happening? As mentioned, same origin policy prevents Javascript from detecting such events. But there's a quite simple

Popup window accessing parent dom

柔情痞子 提交于 2019-11-27 17:27:42
问题 I have a popup window that needs to access the parent dom to generate a print page. The structure of the print page is significantly different then the structure of the parent so a print css would not solve the problem. I basically want to popup a window and then have that window grab some data from the parent of even access the dom from the popup and generate the print page without having to go to the server again. Any ideas how i can achieve this? Im using the standard window.open() to pop

How to display temporary popup message on iPhone/iPad/iOS

我只是一个虾纸丫 提交于 2019-11-27 17:27:34
I'd like to display a temporary message on the iPhone/iPad displaying confirmation of an action, or some quick status about some background activity. Is there a standard control to do this? I've seen apps do this. A rounded rectangle, dark and partially transparent with text inside. It does not ask for user input but disappears on its own in some short period of time. Android has a similar construct which is standard. Also similar to the windows displayed by Growl. Suggestions appreciated. Joe Masilotti There is a user library on cocoacontrols.com that emulates the Android-style Toast pop-ups.