Linked Questions
36 questions linked to/from Open URL in new window with JavaScript
-1
votes
1
answer
19k
views
jquery - how do I open a URL in a new tab/window when the user clicks on a div with no associated href? [duplicate]
I have code like this:
<div id='my-div'></div>
When a user clicks on this div, I would like to open http://google.com in a new tab or window. I'm using jquery as follows:
$('#my-div')....
0
votes
1
answer
1k
views
How to navigate to external URL on menu click in Angular [duplicate]
I am trying to open a URL in new window by clicking on menu item in angular but I don't know a method of doing such thing in _nav.ts file. Below is the code of my menu item
{
name: 'Power ...
0
votes
1
answer
802
views
How to add target="_blank" in location.assign() [duplicate]
In my JavaScript Project of Notes App, there is a location.assign() to my edit note page. But the problem is, whenever I click the note, it opens in the same tab as the index.html page. I have learned ...
0
votes
1
answer
894
views
How do i open a link in js with html code [duplicate]
Following js code refreshing the page to the url, but i wanna make it open in a new tab.
case"example1": case"example2":
l.after('<meta http-equiv="refresh" ...
0
votes
0
answers
564
views
Open a new Browser Window with JavaScript, not tab, not popup [duplicate]
Is there any way to open a new full browser window? not a popup
window.open(url) opens a new tab
window.open(url, "", features) opens a popup
But can one open a window that can have tabs in ...
-1
votes
1
answer
389
views
how can I open mutliple urls in flask app [duplicate]
I want to open multiple urls in separate tabs in my flask app
using following code only first url gets opened.
@app.route('/get_spot', methods=["GET", "POST"])
def spot():
...
1
vote
1
answer
237
views
embedded url at target [duplicate]
This is normally a simple solution if I were using <a href> but because I am using <input> I can't figure out how to make this open a new window using target="_blank". Is there any way to ...
-3
votes
1
answer
181
views
Is there a way to click an image then it'll open the link in a new tab without using anchor tags, purely JAVASCRIPT [duplicate]
Help me pleaz
let discordLogo = document.createElement("img");
discordLogo.setAttribute(
"src",
"https://media.discordapp.net/attachments/1079211646746099792/...
0
votes
0
answers
53
views
Add target blank JQuery [duplicate]
In a search bar, I'm trying to make an URL open in a new window through JQuery.
This is my code from the search bar
And my JQuery code that makes the info you write on the search bar open in an URL ...
1
vote
0
answers
25
views
How to click on React Router Link to open tab in new chrome window not in new tab [duplicate]
I don't want this because it opens the link in a new tab in the same chrome
<Link to="/home" target="_blank">home</Link>
I want to click on the link and open it in ...
166
votes
16
answers
583k
views
Javascript - Open a given URL in a new tab by clicking a button
I would like to have a button that redirects to a given URL and opens in a new tab. How can this be done?
117
votes
9
answers
431k
views
onclick open window and specific size
I have a link like this:
<a href="/index2.php?option=com_jumi&fileid=3&Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,...
45
votes
3
answers
182k
views
Opening new window in HTML for target="_blank"
<a href="facebook.com/sharer" target="_blank" >Share this</a>
How do I make this a certain width and height, in a new window, when the user clicks on it?
In firefox, the current code only ...
6
votes
1
answer
19k
views
How to trigger a new window to be opened from a button click in Angular 2
I have a button and on click of that button a new window should be opened with a new provided URL.
For example:
<button class="btn btn-help"(click)="helpWindow($event)" type="submit"></...
5
votes
2
answers
8k
views
How to open new window instead of new tab in chrome using webdriver?
In order to automate my test application, I need to open few links in a new window instead of tab. Keep this in mind that I am not opening the links in new tab explicitly, it is my web application ...