popup

jQuery select element in parent window

我怕爱的太早我们不能终老 提交于 2019-11-28 20:03:43
Is there a way to select a DIV in the parent window using jQuery? For example: Main page contains this, <div id="testdiv"></div> Popup page has a form with some options and an 'Apply' button. When the user clicks apply it affects the style attribute on the main page. Something along the logic of, parent.$("#testdiv").attr("style", content from form); Use the context-parameter $("#testdiv",parent.document) But if you really use a popup, you need to access opener instead of parent $("#testdiv",opener.document) TARKUS I looked for a solution to this problem, and came across the present page. I

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

夙愿已清 提交于 2019-11-28 19:20:45
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 be Focusable . I've also tried setting the popup's child (a Border ) to be focusable. No luck on either

How to open a jQuery Mobile Dialog from javascript?

删除回忆录丶 提交于 2019-11-28 19:08:17
I have a dialog page and am trying to open it and display results from an AJAX POST. Here is my jQuery success event: success: function(resp) { $("#dialog").dialog(); $("#text").html('SPAM and EGGS!') } My HTML has two pages, the second being the dialog html: <div data-role="page" id="main"> # content </div> <div data-role="page" id="dialog"> <div data-role="header"> <h1>Your Message</h1> </div> <div data-role="content" id="text"> </div> </div> My AJAX POST is working and element id="text" is being updated with "SPAM and EGGS!", but the dialog is not popping up. codef0rmer Add <a> tag anywhere

How to do window.open with no scrollbars in Google Chrome

家住魔仙堡 提交于 2019-11-28 18:25:28
The following code opens the new window without scrollbars in Firefox, IE and Opera. var options = { height: 300, // sets the height in pixels of the window. width: 300, // sets the width in pixels of the window. toolbar: 0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. scrollbars: 0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. status: 0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}. resizable: 1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be

Drag WPF Popup control

≯℡__Kan透↙ 提交于 2019-11-28 18:22:02
the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)? can this be done without big problems or do i have to write a substitute for the popup class myself? thanks Here's a simple solution using a Thumb. Subclass Popup in XAML and codebehind Add a Thumb with width/height set to 0 (this could also be done in XAML) Listen for MouseDown events on the Popup and raise the same event on the Thumb Move popup on DragDelta XAML: <Popup x:Class="PopupTest.DraggablePopup" ...> <Canvas x:Name

Submit a form in a popup, and then close the popup

佐手、 提交于 2019-11-28 18:21:14
This seemed so trivial when I started off with it! My objective is this: When user clicks on a button, open up a form in a new window. Once the form is submitted, close the popup and return to the original page. The reverse order is fine too - i.e., I am okay if the popup is closed and then the form submits. Here's how I'm doing this: <form action="/system/wpacert" method="post" enctype="multipart/form-data" onsubmit="return closeSelf()" name="certform"> <div>Certificate 1: <input type="file" name="cert1"/></div> <div>Certificate 2: <input type="file" name="cert2"/></div> <div>Certificate 3:

JavaScript / jQuery - Open current link in pop-up window

夙愿已清 提交于 2019-11-28 17:42:09
问题 <a href="http://google.com">Link</a> How can I open this link in a pop-up window? And prevent the browser to block it 回答1: There's "new windows" and there's "popups". Using target=_blank will open in a new window, except that modern browsers put new windows in new tabs by default. Which sounds like it isn't what you want. For an actual popup you want window.open() , and be sure to include some specific width and height, otherwise some browsers will still put the new window in a new tab. Darin

Disable/suppress tcltk popup for CRAN mirror selection in R

拟墨画扇 提交于 2019-11-28 17:34:33
问题 My question is similar to a question previously posted but never really answered here: Disable GUI, graphics devices in R I do not like the R tcltk popups for CRAN mirror selection. They also pop up to choose a package when searching for help on a function in two packages. Is there any way to disable these windows without disabling X11 completely? I still want plot() commands to work as normal, but disable the little select menus that take forever to load over a remote connection. For example

How to handle a webview confirm dialog?

三世轮回 提交于 2019-11-28 17:17:33
I'm displaying a webpage in a WebView and on the webpage, there is a button. When you click the button, a confirmation dialog is supposed to popup, but it doesn't show in my WebView. It does popup if I go to the same webpage in the android browser. Anyone know how to handle popup dialogs coming from a webpage inside your WebView? Ok, found the answer and here it is! In order to handle a popup confirmation coming from a webpage in your WebView, you need to override the onJsConfirm method in WebChromeClient to display the popup as an Android Alert dialog. Here is the code to do so. final Context

Android Image Dialog/Popup same size as image and no border

别来无恙 提交于 2019-11-28 17:12:49
问题 At the moment I am working on a file browser. Everything works fine with one exception: If the user clicks on an image (jpg, png, bmp, ..), I want the image to be displayed in a dialog or in a popup which has the same size as the image - so that there are no borders at all. The image files are located on the sdcard. Here is what I have so far: BitmapDrawable bitmap = new BitmapDrawable(context.getResources(), TARGET_PATH); AlertDialog.Builder imageDialog = new AlertDialog.Builder(context);