I have the following webpage which displays a terminal. You type in the bottom bar (e.g. help) and a response is output.
Test input: /unsolvedproblems
If you enter the above, you notice the output includes a hyperlink. I have tried various things to get the link to open not just in a new tab but in a pop up window with a fixed width and height.
The relevant part of the code is here:
} else if (input.value === "/unsolvedproblems" || input.value==="unsolvedproblems") {
matrixEffect();
clearCommand();
textArea.innerHTML += "<br><br>--------Greatest unsolved problems--------<br><br>Here is a list of the greatest <a href='https://en.wikipedia.org/wiki/Lists_of_unsolved_problems' target=_'blank'><strong><u>unsolved problems</u></strong></a> in the world (check out the ones on Computer Science!)";
I have tried:
<a href=onclick="window.open'https://en.wikipedia.org/wiki/Lists_of_unsolved_problems' target=_'blank' 'width=600,height=600'>
and a few other options and keep getting errors.
The whole code (trinket is here) https://trinket.io/html/c979638f8e?runMode=autorun
I also tried this, again with errors:
} else if (input.value === "/bye" || input.value==="bye") {
matrixEffect();
clearCommand();
textArea.innerHTML += "<br><br>--------Goodbye!--------<br><br>Have a good day! <a href="https:www.google.com"
target="popup"
onclick="window.open('https:www.google.com','popup','width=600,height=600,scrollbars=no,resizable=no'); return false;">
Open Link in Popup
</a>";
Are you asking how to open a link in a popup window? If you are then you could try this.
<input type="button" value="Open popup" onclick="window.open('https://en.wikipedia.org/wiki/Lists_of_unsolved_problems','popUpWindow','height=500,width=700,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');">