window.open

Can I open a new window and change the DOM of the calling window in JavaScript?

一世执手 提交于 2019-12-07 22:36:24
问题 First I would like to say that I've been programming JavaScript for about 3 months now and also that I'm not very concerned with solving this problem by the standards or best practices. My main concern is learning to use the DOM. I don't want to use any jQuery because I'm not familiar with it. I'm trying to make a non-profesional "login" function on my page, using JavaScript and the DOM. To begin with I was using "login" screen that would be displayed "hidden" initially and then be displayed

window.open to pass parameters to php and trigger pdf creation and view

非 Y 不嫁゛ 提交于 2019-12-06 09:52:41
I've been using window.open to point to a php file where I create a pdf on the fly using fpdf and display it immediately to the user. Seems to work fine across all browsers and even mobile devices. For example: window.open('/client/feature_Schedule/scheduleReport.php','Schedule_Report','width=900,height=600,status=yes'); I'm not passing any values in this example because all of the parameters needed already exist in the php file. But now I'd like to pass values from javascript along in order to query of the database in the php file before creating the pdf and displaying it to the user. Is

Can I open a new window and change the DOM of the calling window in JavaScript?

被刻印的时光 ゝ 提交于 2019-12-06 05:32:08
First I would like to say that I've been programming JavaScript for about 3 months now and also that I'm not very concerned with solving this problem by the standards or best practices. My main concern is learning to use the DOM. I don't want to use any jQuery because I'm not familiar with it. I'm trying to make a non-profesional "login" function on my page, using JavaScript and the DOM. To begin with I was using "login" screen that would be displayed "hidden" initially and then be displayed "block" when in use. This worked fine and looked really good when I added a darkened screen behind the

window.open not resizable, scrollable

丶灬走出姿态 提交于 2019-12-05 18:49:43
问题 I tried window.open and want the javascript to open a new browser with new url and wants the new window to be resizable and scrollable i tried window.open("someurl", '_blank','windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0, top=0'); Edit1 : tried window.open(url, '_blank','windowOpenTab', 'scrollbars=1,resizable=1,width=1000,height=580,left=0,top=0'); still no luck read about window.open from http://www.javascript-coder.com/window-popup/javascript-window-open.phtml but

Close opened pop-up window on form submission and trigger click on the parent window

ぐ巨炮叔叔 提交于 2019-12-05 18:09:07
I have a parent window from where I am opening a pop-up window using window.open() and I am monitoring the return of that pop-up window using the window.opener method. I have two queries here: On my pop-up window, there is a submit button that takes care of the submit functionality of the form and I would like to wait for the submit to complete and close this pop-up window on submission. When the form is submitted and the pop-up window is closed, I am fetching one of the text box values and using that in my parent window to simulate a search automatically as soon as the pop-up window is closed

Why does window.open(…).onunload = function () { … } not work as I expect?

血红的双手。 提交于 2019-12-05 15:44:33
问题 I want to be able to tell when a window that I open is closed by the user. This is the code of my attempt at monitoring this: <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript"> window.document.onready = function () { document.getElementById('openWindow').onclick = function () { var windowref = window.open('tests2.html'); windowref.onunload = function () { window.alert('hola!'); }; }; }; </script> </head>

In IE, getting error as `no such interface supported` - line - window.open

浪子不回头ぞ 提交于 2019-12-05 10:38:42
I am using IE 11 on windows server 2008 R2 edition. One of tableau URL i open on IE 11 and then there is a link "Export data". When click at "Export data", then it gives me javascript error as no such interface supported . when debug the error then it shows line windows.open(...) script in .js file. I have not created tableau page, i don't have any control over there. This is working fine in all other machines, tested in IE 8, IE 11 at other machine. Please suggst, how i could resolve this error, what is the configuraiton missing in IE to enable - Window.open Thanks 来源: https://stackoverflow

How to catch new window opend by window.open(url, _blank) in PhantomJS?

℡╲_俬逩灬. 提交于 2019-12-05 00:24:46
问题 I'd like to check with PhantomJS whether my script correctly opens a new window/tab on click. The open is triggerd by a js event listener and opened through window.open(url, "_blank") . How can I listen for the new window with PhantomJS? 回答1: There seem to be three ways to do this: onPageCreated CasperJS solves this by using page.onPageCreated. So when window.open is called in the page, a new page is created and page.onPageCreated is triggered with the newly created page. page.open(address,

javascript window.open from callback

好久不见. 提交于 2019-12-04 17:34:13
问题 window.open() called from main thread opens new tab by default. But, here open new window every time (Opera 16 and Google Chrome 29) <input type="button" value="Open" onclick="cb1()"> <script type="text/javascript"> function cb1() { setTimeout(wo, 1000); //simple async } function wo() { var a = window.open("http://google.com", "w2"); a.focus(); } </script> (lol, this is my answer for Open a URL in a new tab (and not a new window) using JavaScript). How I can open in the tab (by browser

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=