popup

Javascript to open popup window and disable parent window

自古美人都是妖i 提交于 2019-11-26 22:11:43
I want to open a popup window and disable the parent window. Below is the code that I am using; function popup() { popupWindow = window.open('child_page.html','name','width=200,height=200'); popupWindow.focus(); } For some reason, the parent window does not get disabled. Do I need some additional code OR what is the case? Again, I am looking for something similar to what we get when we use showModalDialog()..i.e. it does not allow to select parent window at all..Only thing is I want to get the same thing done using window.open Also please suggest the code which will be cross-browser compatible

JavaScript window.open only if the window does not already exist

冷暖自知 提交于 2019-11-26 22:08:57
I have an application that opens a new window on clicking a link. This spawns a page that holds a Java applet. The problem I am having is that clicking the same link reloads the page, which resets the Java application. Is there any way to trap this? Two solutions that would be acceptable are: Allow multiple windows to be opened from the click handler Ignore subsequent requests if the window is already open Apologies for being a Javascript newbie - it's not really my main thing. The code attached to the handler is function launchApplication(l_url, l_windowName) { var l_width = screen.availWidth

How do you get window.open to work in internet explorer 7?

拈花ヽ惹草 提交于 2019-11-26 21:52:48
问题 I've been trying for the past 3 hours to get my svg web site to open popups, and all I ever get is "Permission Denied" errors in internet explorer. I've tried everything I could find on google, and nothing works. I've even gone to the point of just calling window.open() blank with no parameters, and still get a permission denied error. What is the currently accepted standard for opening popups in internet explorer... that works? 回答1: This is part of the security changes made in IE6. Now you

Closing child pop-up and refreshing the parent page

空扰寡人 提交于 2019-11-26 21:21:06
问题 I am trying to achieve the following. A link on a parent page will open a new child pop-up. In the child pop-up, the user enters some data and clicks “Save”. Data will be saved to database and the pop-up will be closed. The parent window would be refreshed, and the data entered in the child pop-up would be displayed in the parent page. How can this (closing a child pop-up and refreshing the parent page) be done in Javascript? 回答1: In the pop-up window: <script type="text/javascript"> function

popup window in Chrome extension

徘徊边缘 提交于 2019-11-26 21:19:58
I am writing a Chrome extension, and I want a login window to be popped up when users click on the context menu so that user can input username and password. In Chrome extension, I only found chrome.pageAction.setPopup and chrome.browserAction.setPopup can be used to show popup windows, but they show popups only when the page action's icon or browser action's icon is clicked, not the context menu. Of course, I can use javascript prompt box to do this, but the problem is the password cannot be masked in the prompt box. So I am wondering if there are some other ways to create a popup window in

Handling a popup window using selenium

无人久伴 提交于 2019-11-26 21:03:44
问题 I have a circumstance in which clicking a link webpage opens a popup window. And after the popup window opens the focus is in the popup window and master window is disabled. And i am unable to get the control transferred to the popup window. Please have a look at the following code. driver.findElement(By.linkText("Click me")).click();// when this line of code is reached then a popup window opens. System.out.println("After Clicking me"); // After the popup window opens this line of code is

how can we disable resizing of new popup window in firefox?

妖精的绣舞 提交于 2019-11-26 21:01:15
问题 I tried opening a new window using window.open("lookup.htm","lookupWin", "height=400,width=500,resizable=false"); It works fine in IE, but in FF the pop up is still resizable. How can I disable this resizing in FF as well? 回答1: Read this one from mdc Window functionality features resizable If this feature is set to yes, the new secondary window will be resizable. Note: Starting with version 1.4, Mozilla-based browsers have a window resizing grippy at the right end of the status bar, this

Open multiple links in Chrome at once as new tabs

夙愿已清 提交于 2019-11-26 20:56:55
问题 I'm trying to open multiple links at once in Google Chrome in new tabs but it fails. Problems: Blocked by popup Open in new windows instead of tab after the user allowed the popup With this, I can open multiple links at once in Firefox: <!DOCTYPE html> <html ng-app="plunker"> <head> <meta charset="utf-8"> <title>AngularJS Plunker</title> <script>document.write('<base href="' + document.location + '" >');</script> <link rel="stylesheet" href="style.css"> <script data-require="angular.js@1.2.x"

Making a window pop under in chrome

南笙酒味 提交于 2019-11-26 20:47:45
问题 I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent window. Please suggest a fix. use case/eg: Well, for eg if you see kayak.com or any travel website, you have the ability to search on other websites too..I want to do something similar so need the pop under... Code: I am using a window.open(.......).blur(), but for some reason it isnt working in chrome. 回答1: I take back

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

时光总嘲笑我的痴心妄想 提交于 2019-11-26 20:29:50
问题 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