window.open

How to pass a value from a parent window to another html page using javascript?

佐手、 提交于 2019-12-02 18:33:37
I have 2 windows home.html and result.html . In home.html I have a <textarea> #txtinput and a <button> #btn . In result.html I have another <textarea> #txtresult . On home.html , if I enter a value into #txtinput and click #btn , I want to open result.html and pass the value of #txtinput into #txtresult . I've tried the below code from another post, which displays the value in the new window's body but won't display it in my element var myWindow = window.open(); myWindow.document.body.innerHTML = document.getElementById("txtinput").value; Is it somehow possible in a simple way? I am relatively

Javascript to open URL within a new Tab (instead of a window)

六月ゝ 毕业季﹏ 提交于 2019-12-02 18:01:49
问题 Hey guys. There are a few entries here requiring solutions to do the opposite of this, and others vaguely related. In one of them, the poster asked how to do this on Mozilla Firefox. Actually though, firefox will always open the URL in a new tab when window.open() is called, unless you set the window's size within its parameters. So Mozilla and Chrome do what I want by default. The question is: how do I get Internet Explorer to open the URL I want within a new tab, as opposed to doing it in a

window.open without popup blocker using AJAX and manipulating the window.location

白昼怎懂夜的黑 提交于 2019-12-02 17:19:47
When dealing with OAuth from the server, such as Twitter and Facebook, you most likely will redirect the user to an URL asking for app permission. Usually, after clicking a link, you send the request to the server, via AJAX, and then return the authorization URL. But when you try to use window.open when the answer is received, your browser blocks the popup, making it useless. Of course, you can just redirect the user to the new URL, but that corrupts the user experience, plus it's annoying. You can't use IFRAMES, but they are not allowed (because you can't see the location bar). So how to do

Converting window.open(Hyperlink) Javascript code to pure absolute url with JAVA

风流意气都作罢 提交于 2019-12-02 16:16:18
问题 I work on a website with JAVA Jsoup Library to extract some hyperlinks Document doc = Jsoup.connect("http://www.saudisale.com/SS_a_mpg.aspx").get(); Elements script = doc.select("script") ; for(Element elementary :doc.select("table")) { System.out.println(""+elementary.select("tbody").select("tr").select("td").select("input").attr("onClick")+""); Sample Output:- window.open('http://saudisale.com/arPrivatePage.aspx?id=21871638','_blank','channelmode =1,scrollbars=1,status=0,titlebar=0,toolbar

passing PHP variables across javascript windows.open to another PHP page

家住魔仙堡 提交于 2019-12-02 15:55:55
问题 I have a PHP page index.php contains javascript window.open code to make another page create_pdf.php popup and pass some PHP variables to it to create a pdf file using FPDF Here is my variables: $text1 = "this is text1"; $text2 = "this is text2"; And here is FPDF code in the http://mysite.com/create_pdf.php page, which I need to pass PHP variables $text1 and $text2 to it from index.php page: require('fpdf.php'); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,

How to Create a Mailto Share Button that Opens a Window in which Ones Can Enter Email Address to Send to

♀尐吖头ヾ 提交于 2019-12-02 15:37:44
问题 I've been searching all over the internet to find out how to create a mailto share button that opens up a new window in which the user can then type in the email address of his choice to send to. I've an attached a sequential set of images as operational example: What is the trick to this? Why can't I find any info on how to write such code ....absolutely nowhere on Stack Overflow either! As of right now this is the code that I have: $('.share-page-on-Email').click(function() { window.open(

Open links, one after another

不羁的心 提交于 2019-12-02 14:01:11
问题 I'm making a website where I'm opening a new window every 30 seconds. I got it to open the new windows properly, but I would like it to close the last window opened before opening the new one, so only one window is open at a time. How would I do this? Here's my code so far: <script type="text/javascript"> function open_win() { window.open("http://www.wol.com"); setTimeout(window.open('http://www.bol.com'),35000); setTimeout(window.open('http://lol.com'),70000); setTimeout(window.open('http:/

setTimeout to window.open and close, on the same window?

半城伤御伤魂 提交于 2019-12-02 13:30:07
问题 I'm having a little difficulty opening up windows after a period of time, and then closing them after a period of time, automatically. I'm not sure why, but it seems like when I try to use setTimeout on a window.open and window.close they interfere somehow. Here is my code atm: function topLeft() { var myWindow = "image.png", "ONE", "width=300,height=310,top=100,left=100,menubar=no,toolbar=no,titlebar=no,statusbar=no"; setTimeout(function() { myWindow.window.open() }, 5000); setTimeout

passing PHP variables across javascript windows.open to another PHP page

不羁岁月 提交于 2019-12-02 12:33:00
I have a PHP page index.php contains javascript window.open code to make another page create_pdf.php popup and pass some PHP variables to it to create a pdf file using FPDF Here is my variables: $text1 = "this is text1"; $text2 = "this is text2"; And here is FPDF code in the http://mysite.com/create_pdf.php page, which I need to pass PHP variables $text1 and $text2 to it from index.php page: require('fpdf.php'); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40, 10, $text1); $pdf->ln(); $pdf->Cell(40,10, $text2); $pdf->Output(); And here is the PHP variable $pdf

Javascript to open URL within a new Tab (instead of a window)

一笑奈何 提交于 2019-12-02 09:30:15
Hey guys. There are a few entries here requiring solutions to do the opposite of this, and others vaguely related. In one of them, the poster asked how to do this on Mozilla Firefox. Actually though, firefox will always open the URL in a new tab when window.open() is called, unless you set the window's size within its parameters. So Mozilla and Chrome do what I want by default. The question is: how do I get Internet Explorer to open the URL I want within a new tab, as opposed to doing it in a new window? Thanks in advance. The obvious answer is to open the link with target="_blank" . As you