0
Hi, I for some reason can't get the link to pop-up on a new window.
Here's the code I wrote to make this happen. Can you please tell me what's wrong with it? <p align=center><a href="https://www.facebook.com/petros.moulatsiotis.9" target="_blank"><img src=https://f4.bcbits.com/img/a2750339549_10.jpg height=50% width=20%border=2px alt="" /></a><br /><strong>Chill Coding Practice</strong></p>
10 Answers
+ 3
Pop-up on a new window will not work here in Sololearn because your target is not related to Sololearn links and also because it not a browser so it will always open in other application like a browser.
But if you will try it on Sololearn Website then it will open in a new window.
+ 3
Open in browser and click on link it will work fine as I am seeing there is no problem.
+ 3
If you are talking about new window not a tab then there is a solution:-
"You can open a new window (HTML4) or a new browsing context (HTML5). Browsing context in modern browsers is mostly "new tab" instead of "new window". You have no influence on that, and you can't "force" modern browsers to open a new window."
But if you want to open it on new window then you can simply do with onclick event like this:-
<a href="#" onclick="window.open('https://www.facebook.com/petros.moulatsiotis.9', 'newwindow', 'width=300,height=250'); return false;">Chill Coding Practice</a>
+ 2
It's working fine. Please clear your browser history first
+ 2
Are you able to open it in new browser tab?
+ 1
Run it on PC. Your code is fine
0
I was trying this from notepad and opening it as a .html file
0
Yeah it still opens on the same window for some reason :/
0
I tried clearing everything still doesn't work
0
I'll try that as soon as i get home but anything is better than it replacing the original tab and opening the new link in its place. Tab/window