mylink (the button's this) isn't a string, so you try to open mylink.href:
if (typeof(mylink) == 'string')
href = mylink;
else
href = mylink.href;
But buttons don't have href properties, so it's as if you wrote:
window.open(undefined, 'about', 'width=400,height=200,scrollbars=yes');
which opens a blank page, as expected. If you want to open the same page as the link, use:
onclick="popup('newpopup.html', 'about');"
Answer from Paul Roub on Stack Overflowpop-up a window when the user clicks a button
How to do simple Popouts in Html
Pop up window with HTML CSS JS
How to make a popup in HTML? Different methods - Installation & Integration - Popupsmart Community
How to create a popup in HTML with CSS?
What is the HTML tag for popups?
How to make a popup card in HTML?
Videos
mylink (the button's this) isn't a string, so you try to open mylink.href:
if (typeof(mylink) == 'string')
href = mylink;
else
href = mylink.href;
But buttons don't have href properties, so it's as if you wrote:
window.open(undefined, 'about', 'width=400,height=200,scrollbars=yes');
which opens a blank page, as expected. If you want to open the same page as the link, use:
onclick="popup('newpopup.html', 'about');"
Try this simple piece of code:
<script>
function fullwindowpopup(){
window.open("newpopup.html","bfs","fullscreen,scrollbars")
}
</script>
<center>
<form>
<input type="button" onClick="fullwindowpopup()" value="CLICK HERE">
</form>
</center>
Dear community I am desperately searching how to stile these simple popout windows that most radio stations use when you want a simple webplayer outsite of the regular website. I am interested on that topic because I want to build a simple web app to run in such a window. Looking forward to your suggestions!
Reference: Go to www.npo3fm.nl and click on the button „Open in venster in the lower right corner of the desktop version of the website.