window.open

How do I pass any array to a window being opened with window.open()

孤街浪徒 提交于 2020-01-22 03:06:06
问题 I have any array called query[] I am opening a new window with: window.open("http://localhost:8081/myapp/Query.action","mywindow","menubar=1,resizable=1,width=600,height=400"); How do I pass this array to the new window so I can use it there. EDIT: I just found this, Pass array to Window which will probably provide the answer. EDIT2: the answer provided in question 2487420 doesn't seem to work, I am using FireFox and openDialog never opens a new window New Requirement: This only has to work

jquery window.resizeTo in Slow Motion

蹲街弑〆低调 提交于 2020-01-16 00:55:06
问题 I want to resize a window in slow motion mode but the following code doesn't work and I have no idea what to do: var myWindow; function resize() { var windowsHeight = jQuery(window).height(); var windowsWidth = jQuery(window).width(); var DivX = windowsWidth - 320; var DivY = windowsHeight - 480; } myWindow = window.open("/", "", "width=320, height=480"); myWindow.resizeTo(windowsHeight, windowsWidth),1000; myWindow.focus(); 回答1: In this example you can see the animation effect. Just

strip characters from url on javascript 'onclick'-command

こ雲淡風輕ζ 提交于 2020-01-14 06:04:53
问题 I'm afraid this may be a very stupid question. I want to refer people via a pop-up and automatically fetch the url from the current document (so that I don't have to adapt the code to every page). The link I'm using is like this: <a href="http://www.facebook.com/sharer.php" title="Add to Facebook" onclick="window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href), 'facebook','toolbar=no,width=550,height=550'); return false;"></a> The problem I'm facing is with the

window.open not working in IE

我是研究僧i 提交于 2020-01-10 11:52:11
问题 Apparently, this call to window.open is not valid under Internet Explorer. The Javascript code on my site is not running, I would assume it is due to that error. The line it tells me the error is on, is the call to window.open, apparently an argument is not valid there. $('.objeto').click( function() { var center = 'height=380,width=900,top='+((screen.width - 900)/2)+',left='+((screen.height - 380)/2); var address = $(this).attr('id'); window.open (address,'Ver articulo', config=center); } );

Href link with OnClick event

孤者浪人 提交于 2020-01-07 04:57:08
问题 i am having a link like below where on click of that twitter , i need to open the twitter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message.. <a style="text-decoration:none;" href="http://www.twitter.com" onclick="window.open(\'http://twitter.com/home/?status=\'+encodeURIComponent(location.href)+\'-'.$markme_ddesc.'\');return false;"> Why so? how to resolve this?? Please help

Javascript: Iterate through array of URLs and open, then close at defined interval

做~自己de王妃 提交于 2020-01-05 08:21:48
问题 I have an array of URLs that I need to loop through and open in a new window. However, I need to be able to set a timeout between each window's open and close. In other words, the window should only stay open for a set interval, then move on to the next URL in the array. The following code opens the windows, but only closes the first one. (function X() { document.getElementById("target").onclick = function () { var urlList = ['http://www.google.com', 'http://www.msn.com', 'http://www.yahoo

Javascript: Iterate through array of URLs and open, then close at defined interval

梦想的初衷 提交于 2020-01-05 08:21:33
问题 I have an array of URLs that I need to loop through and open in a new window. However, I need to be able to set a timeout between each window's open and close. In other words, the window should only stay open for a set interval, then move on to the next URL in the array. The following code opens the windows, but only closes the first one. (function X() { document.getElementById("target").onclick = function () { var urlList = ['http://www.google.com', 'http://www.msn.com', 'http://www.yahoo

window.open is not applying the given height parameter

…衆ロ難τιáo~ 提交于 2020-01-04 13:39:35
问题 I have a onclick event on a link inwhich window.open for a url is executed , I have also given the custom width and height for it, but is not accepting it and pop window is displayed with different width and height.. can someone guide me what must be wrong with that my window.open syntax is as follows onclick='var myW=window.open ("http://www.google.co.jp/","mywindow","location=1,toolbar=1,menubar=1,resizable=1,width=846,height=786"); Also how to change the display position of pop window in

open new window or tab but keep focus in the current [duplicate]

岁酱吖の 提交于 2020-01-03 04:50:10
问题 This question already has answers here : Open a new tab in the background? (5 answers) Open a new tab with javascript but stay on current tab (4 answers) Closed 3 years ago . I want to open new window or tab, but I want to keep focus in the current window. I currently use the following code : window.open('/Pages/FilesDownload.aspx?q=' + args._commandArgument, '_blank'); what is the modification I must do to in the code? 回答1: Try window.open('/Pages/FilesDownload.aspx?q=' + args.

Saving a child window saves the parent window instead (Javascript)

人走茶凉 提交于 2020-01-03 02:23:30
问题 I have a bit of Javascript code that creates a "save friendly" version of a webpage. child = window.open("","child"); child.document.write(htmlPage); "htmlPage" is the basic html of the page with all the javascript references taken out, a different set of header images references, etc. Everything displays perfectly in the popup window, with no javascript running. When I click on "File->Save As", the saved file is the parent window, along with all of its javascript, and with no trace of the