window.open

Form with 2 submit buttons

≡放荡痞女 提交于 2019-12-11 09:06:11
问题 I have one form with 2 submit buttons. The form generates a URL. The 2 outputs of the form are: It writes a URL to a hidden div which displays when they click the Preview button, and It launches the same URL in a new window when they click the Open button. I am able to write to the hidden DIV, so the Preview function works perfectly. My problem is: I am not able to get the window.open function to work correctly with the Open button. When I click the button, I get "http://www.my_current_domain

launchExternal doesn't work on XDK app on Android

只谈情不闲聊 提交于 2019-12-11 07:44:13
问题 I have an application that was developed in XDK. The app links to an external web site at one point (for a PDF actually). I've tried both window.open(url,"_system") and intel.xdk.device.launchExternal(url) and both work on IOS and Android when using the Intel App Preview app. However, once the build was completed and the app was uploaded to the Play store, the external links do not work. I can't say about IOS yet because Apple hasn't finished testing the app, but on Android, it's as though

window.open() on a multi-monitor/dual-monitor system - where does window pop up?

99封情书 提交于 2019-12-11 06:57:15
问题 When using javascript window.open() on a multi-monitor system, how do you control which monitor, or where in the display space the popup opens? It seems out of control to me and otherwise random in it's behavior. 回答1: Result of "window.open dual-screen" search revealed this fancy nugget: Dual Monitors and Window.open "When the user clicks on a link that opens a new window using window.open. Make the window appear on the same monitor as its' parent." // Find Left Boundry of the Screen/Monitor

How to know when popup is closed in javascript

霸气de小男生 提交于 2019-12-11 05:36:45
问题 This code will open go.com in popup window: <a href="javascript:void(0)" onClick="javascript:window.open('http://go.com','','status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=300px,height=300px')">open</a> and I want to use alert('closed!') in main page, when popup is closed and I can't edit popup page for use onunload="alert('closed!')" , because the popup page is an external page and I can't change the code like var mywindow = window.open('http://go.com') ... Thanks. 回答1:

On clild window close cannot send value to parent window in JavaScript for iPad Safari

核能气质少年 提交于 2019-12-11 04:43:06
问题 I need to open a new popup window/tab using window.open method of javascript and on close of the new tab/popup window have to return some values from closing window to parent window. When I open a popup suing window.open in my asp .net application which is supposed to be compatible with iPad. Value has successfully been returned when I use IE, Chrome, FireFox and Safari (on PC with windows 7). Unfortunately the same code fails in Safari when I access the application through iPad. On iPad

How to call a function from another HTML page?

给你一囗甜甜゛ 提交于 2019-12-11 04:31:59
问题 I want to call a function from another HTML web page I create. If the second Javascript function is this: function g(x){ alert(x); } So I tried this in the first page: function f(){ var x = prompt("enter"); testwindow = window.open("otherWebPage.html", "_self"); testwindow.g(x); } f(); but its not working. Where did I go wrong? (it's not really my code in the page, i just gave a simple example) 回答1: The problem is you are calling testwindow.g before the code in otherWebPage.html has run. You

Change browser size using C#

元气小坏坏 提交于 2019-12-11 04:19:42
问题 Can I change the browser width from C#? I want to do something similar to this: var window = window.open("page.html"); window.resize(100,100); but in C#, something like this: Process p = Process.GetProcessesByName("page.html")[0]; p.resize(100,100); Is it possible? 回答1: Once you have obtained the handle to the main window of an application such as a browser, you can use the Windows API SetWindowPos() to change its size. You would get the window handle from somewhere like Process

Google Chrome Userscripts reference window.open

不想你离开。 提交于 2019-12-11 04:06:02
问题 I have been trying to figure this one out for a while, but when I try to reference a window that I opened the handle is always undefined. It is worth noting that this is being used in a userscript and here is the snippet in question: var donateWindow; // ###################################################################### // # Show the donation popup and open a window to paypal site // ###################################################################### function showDonateWindow() { if

How to get get URL of new page using casperJS

让人想犯罪 __ 提交于 2019-12-11 00:20:11
问题 I am using casperJS to get links when clicking a button. The links are returned with window.open in javaScript. The code I have written logs all the pages after clicking button, but phantom is not exiting in terminal window. Also some pages only show about:blank, especially the last ones. var casper = require('casper').create(); var page = require('webpage').create(); var address = 'http://www.example.com'; page.open(address, function() { page.onPageCreated = function(newPage) { newPage

on('load') does not work for opened popup in internet explorer 11

喜夏-厌秋 提交于 2019-12-11 00:18:21
问题 I do not recall the last time I used popup for anything, but :( I want to open new window and when it is opened I want to shout "1". Window opens in all browsers, but in IE 11 / Edge it does not alert(). <html> <head> <script src="//code.jquery.com/jquery-3.1.1.min.js"></script> <script> $(document).ready(function(){ $('#button').on('click',function(e){ e.preventDefault(); var win = window.open ('/test.html') $(win).on('load',function(){ alert ('opened'); }); }); }); </script> </head> <body>