window.open

How to pass special characters to javascript window.open in URL using paper.add method?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:04:28
问题 paper.add([{ type: "text", x: 340 + textLength + 28, y: 410, text: "4860", fill: "blue", href:"javascript:window.open('https://planning.partners.com/ep/#Create Campaign&CId=4860');void(0)" } ]).attr({ 'font-size': 14, "font-family": "Segoe UI", "text-decoration": "underline", 'text-anchor': "start" }); The above code is rendering the text (4860) fine and showing the hyperlink. But when i am clicking on the hyperlink, the window is opening with the URL "https://planning.partners.com/ep/". The

IE won't load PDF in a window created with window.open

╄→гoц情女王★ 提交于 2019-12-12 08:22:10
问题 Here's the problem, which only occurs in Internet Explorer (IE) . I have a page that has links to several different types of files. Links from these files execute a Javascript function that opens a new window and loads the specific file. This works great, unless the file I need to open in the new window is a PDF in which case the window is blank, even though the URL is in the address field. Refreshing that window using F5 doesn't help. However, if I put the cursor in the address field and

transferring php form data to a js window

十年热恋 提交于 2019-12-12 03:53:09
问题 I am designing a game with javascript and jquery. In my game when a player talks to another character it opens the text as an external file using the window.open('') function. At the beginning of the game the user has to enter a name for their character it is then processed by php: <form action="play.php" method="get"> <input type="text" name="name"/><input type="submit" value="confirm"/> </form> . As I said before when a player talks to another player it opens the external file but what I am

Opening a link in new tab

我与影子孤独终老i 提交于 2019-12-12 03:46:06
问题 I am using an imagebutton to send the ID of a project as a command argument. In a window, I only display one picture and that's the imagebutton. When that image is clicked I want to open the related project's all pictures in a new tab. With this code on code behind, int ID = Convert.ToInt32(e.CommandArgument); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", string.Format("yenipencere = window.open('Projeresim.aspx?ProjeID={0}','_blank')", ID), true); I can manage this

appendChild dataURI image to window.open failing in IE

佐手、 提交于 2019-12-12 03:24:56
问题 I am trying to grab an image from an interactive map using dataURI. That image is then appended to a new window layout for printing. This works in Firefox and Chrome but not in IE11 or Edge which both throw errors. IE: "HierarchyRequestError" Edge: "No such interface supported" This question is very similar but unanswered and the offered solutions relate to objects other than image data. I suspect this method might work but i can't figure out how to implement it properly for a URI. Current

How jQuery can prevent reopening a new window?

跟風遠走 提交于 2019-12-12 03:22:03
问题 I have the code below to open a new window whenever user presses F2 key. $(document).bind('keyup', function(e){ if(e.which==113) { window.open('newPage.htm','_blank','','false'); } }); Now, I want to prevent user to open a new window while the previous one is still opened. How can I dot it ? 回答1: var opened = null; $(document).bind('keyup', function(e){ if (e.which == 113 && (!opened || !opened.window)) opened = window.open('newPage.htm','_blank','','false'); ​});​ 回答2: Give your window a

Javascript and PHP (window.open)

你。 提交于 2019-12-12 00:03:03
问题 So, in my website, I have a news system which has an option to edit and delete the news the administrator desires. Well, I got the edit part right by using: href="noticiaEditarForm.php?id_noticia=<?php echo $id ?>">Editar</a> And then a $_GET on the other page. However, this is not how I desire my editing window. Therefore, I have been exploring a way to send the PHP variable that contains the primary key for the news table (MySQL) to a popup window, using JavaScript. But that's just the

Pass array to Window

老子叫甜甜 提交于 2019-12-11 21:52:56
问题 can we pass an array to window.openDialog or window.open in javascript? I know that we can pass parameters, but can this be an array? 回答1: yes we can ... ...window.openDialog is an extension to window.open. It behaves the same, except that it can optionally take one or more parameters past windowFeatures, and windowFeatures itself is treated a little differently. The optional parameters, if present, will be bundled up in a JavaScript Array object and added to the newly created window as a

window.open(“sms:…”) works for android but not for ios

不打扰是莪最后的温柔 提交于 2019-12-11 10:43:49
问题 I have this function, which pre-fills sms text message on click. This works on Android, but on any version if iOS, it just open new empty window. Any idea, why? var ua = navigator.userAgent.toLowerCase(); var url; if (ua.indexOf("iphone") > -1 || ua.indexOf("ipad") > -1) { var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); var ver = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; if (ver[0] >= 8) { url = "sms:&body=" + encodeURIComponent("Hello guys, this is an

How to set a downloading file name using window.open in javascript

依然范特西╮ 提交于 2019-12-11 10:34:08
问题 Hello I am very new to javascript. I am using the following code to export html table to xl file. It is working fine. But I am unable to set a file name. I searched for this got some solutions but nothing is working for me. HTML Code: <a onclick="fnExcelReport('customers');" href="#" download="your-foo.xls"> EXPORT </a> Javascript Code: function fnExcelReport(tableId) { var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>"; var textRange; var j=0; tab = document.getElementById(tableId); /