Open popup windows with HTML and Javascript

Configure the opening of a pop-up window attached to a link

Not dilunghiamoci in useless talk and let’s get right to the point. To open a link in a separate pop-up window to our page, we need to insert inside the head of the page the following javascript code.

<script type="text/javascript">
function ApriPopup(pagina) {, "", "top=20, left=30, width=600, height=200, status=no, menubar=no, toolbar=no scrollbars=no");

then, instead of inserting the link in the href of the link, the user must insert the call to our function that expects a link to open. Practically we have to write this code

<a href="javascript:ApriPopup('')">Apri la popup</a>
Offrimi un caffè su
We randomly check the functioning of the links in our articles. In the meantime, if any links are corrupt, please let us know in the comments, we will correct them. Thanks.


Founder and CEO of Dummy-X since 2007, I share interests, ideas, projects, and IT solutions. I do not sell products, I limit myself to describing technologies and making available the right tools to realize ideas. Everything I write is the result of my work experience and my desire to learn. I have always been studying computer science in all its angles (software, hardware, networks and security) and in recent years I have specialized in the development of web applications. I am always open to new challenges and to research and knowledge of new technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *