popup

Auto-closing a popup with a file to download

扶醉桌前 提交于 2019-12-04 12:42:59
I have a file, named download.php , which contains a file to be downloaded, so it has the following headers (declared with PHP): header("Content-Type: ".pathinfo($_GET['file'], PATHINFO_EXTENSION)); header("Content-Length: ". filesize($_GET['file'])); header("Content-Disposition: attachment; filename=". $_GET['file']); download.php is opened as a popup with jQuery by an other page. Now I want download.php to self-close (using JavaScript) after some seconds (so I'm secure that download started) but I didn't manage to write working code. Here are the codes I tried (I placed them after headers):

Is it possible to open a new window and embed iframe in to this?

北慕城南 提交于 2019-12-04 12:17:57
问题 I need to open a new window and I want to embed a video in an iframe and show it in this window. As normal pop-up window syntax is: window.open(URL,name,specs,replace) How will I pass the iframe code instead of URL so that the iframe is embedded in the new window? Please suggest. Thanks in advance. 回答1: You don't pass the iframe code to window.open , you get a handle on the window you are opening and write the iframe to that window. var win = window.open(); win.document.write('<iframe width=

Modal popup search window to replace dropdown control ASP.NET

我怕爱的太早我们不能终老 提交于 2019-12-04 12:14:04
I'm looking for the simplest way of popping a modal search window on top of an ASP.NET 3.5 application to look up values for a field. I've got a screen for users to add courses; users need to be able to choose an instructor by searching for instructors in a popup. So - the popup would have a textbox and a gridview with results; clicking the "choose" button in a result would populate the instructor field on the calling form. What's the simplest way to achieve this? Try using jQuery inside a UserControl with something like the tutorial from yensdesign . The UserControl I created with this

ANDROID: How can I launch a popup dialog from an notification or long-pressed search button on top of all windows?

亡梦爱人 提交于 2019-12-04 11:58:43
I have searched and everything is about launching an activity not a dialog. What I want to do is to display a notification in the status bar, and when the user presses it a dialog pops up on top of whatever the user was viewing before s/he clicked the notification. I dont want the dialog to show on top of the main activity or the recent apps list. Also, how can i launch the dialog from long pressing the search button? Thanks! Reed I'm copying from here: Here is answer to Start activity as dialog i defined <activity android:theme="@android:style/Theme.Dialog"> now when i startActivity() it

Chrome extension popup showing by condition

别说谁变了你拦得住时间么 提交于 2019-12-04 11:35:22
I want to show popup by click, but only if condition is false. After click to extension icon background js searchig for tab with current name. If tab found background js continues working. If not found - i want to show popup with instructions. Can`t understand how to just show popup in this case. I can set popup by browserAction.setPopup(), but popup will be displayed only after next clicks. I just want to show my popup one time. It is definitely posible, I've seen this behavior on other extension. var pcTabs; // tabs array chrome.browserAction.onClicked.addListener(buttonClick); function

Django How to implement alert()(popup message) after complete method in view

穿精又带淫゛_ 提交于 2019-12-04 10:57:27
问题 I would like to have an alert() message (like in javascript) after method in view.py is complete My method is def change_password(request): dictData = getInitialVariable(request) in_username = request.POST['txt_username'] in_password = request.POST['txt_password'] in_new_password = request.POST['txt_new_password'] user = authenticate(username=in_username, password=in_password) if user is not None: if user.is_active: u = User.objects.get(username=in_username) u.set_password(in_new_password) u

Increase max popup width in a Chrome extension?

梦想与她 提交于 2019-12-04 10:26:51
问题 I am making a Chrome extension and I need to increase the max width size of the frame window (popup). If I increase the width of popup.html, then the inner width is increased. I need to increase the size of the popup. 回答1: Do you mean you are hitting the width limit? You can increase popup width up to 800px, anything over is ignored. 来源: https://stackoverflow.com/questions/4666032/increase-max-popup-width-in-a-chrome-extension

How to change the color of the currently selected line in a code assist popup in Eclipse?

假如想象 提交于 2019-12-04 10:09:49
问题 I've recently downloaded Eclipse 3.6, everything works fine, but there is one issue that really frustrates me. The highlight color of a currently selected item in a code assist popup is barely visible against white background. I've tried to mess with color settings, but it seems that there is no option for my needs. The line highlight color set in Windows color scheme is only used to highlight in a focused popup. 回答1: I believe it is hidden in another part of Preferences. I personally wanted

The proper way to handle popup closing

偶尔善良 提交于 2019-12-04 09:58:44
I'm looking for close event for popup. I've found one for XUL , but I need it for HTML. Popup has closed property. >>> var popup = open('http://example.com/', 'popup', 'height=400,width=500'); >>> popup.closed false Well, I can check it once at half second . function open_popup() { var popup = open('http://example.com/', 'popup', 'height=450,width=450'); var timer = setInterval(function(){ if (popup.closed) { alert('popup closed!'); clearInterval(timer); } }, 500); } I've tested it on Chrome 4.0.249.27, Opera 10.10, Safari 4.0.4, and Firefox 3.5.5. All works fine. But setInterval bother me. It

Popup using knockout js

亡梦爱人 提交于 2019-12-04 08:22:24
i'm migrating one of my older jquery plugins from DOM jungle to this fancy mvvm framework knockout. Which technique would i use to properly display a popup container? I ahve to populate it 'by call' since i get a json feed every time. I tried an approach using the with binding, but it still attempts to populate the partial at its first runtime. <!-- ko with: daySubmitFormViewModel --> <div class="ec-consulation-lightbox"> <form id="cForm" class="form-container"> // Some bindings here. </form> </div> <!-- /ko with: --> It can be done without custom binding as well. Example is below <div class=