More

    How to Generate Popup Window in Javascript

    Must read

    Secure Your Internet With The Exclusive Hacker-Proof Quantum Internet

    Everyone dreams of being 100% sure about the Internet is safe. Unfortunately, the Internet like any other entity is prone to various...

    Studies Reveal Strange Structure Of Blues In The Visible Spectrum!

    Nature is always defined as green or blue. When you look around yourself the brightest and the most pronouncing colours that appear...

    9 Interesting Features Of Arlo’s Smart Doorbell That Will Secure Your House!

    Are you also concerned about the security of your house?  Do you also feel that before opening...

    Kindle Vs Nook – Don’t Buy Without Reading This Comparison

    Kindle vs Nook? This is a common question that is marking a steady ground in the minds of the e-readers for whom,...
    How to Generate Popup Window in Javascript 3
    Sreejeshhttps://techgyo.com
    Hi there! I'm +Sreejesh and I am an internet enthusiast. I started writing on this blog as a hobby, now full time blogger. In this blog, I cover topics about blogging, and how to make money online, and also some interesting techy news, tips and tutorials. Checkout archives

    Being a blogger, we always get hands with html coding in different instances. In this tutorial, I’ll show you how to Generate Popup Window in Javascript to make a link open in a pop up window. Basically, it’s about making Modal window or popup window also know as modal window using JavaScript. You can also make a popup link using HTML, but here we’re showing the JavaScript technique. Its very simple if you try to understand the code.

    Steps to Generate Popup Window in Javascript

    To test your code, you can use our HTML editor.

    Here’s we’re declaring the function and specify the hieght and width of the popup window. Just add the below code between <BODY> and </BODY> of your HTML Template.

    <!--TECHGYO POPUP CODE STARTS-->
    <script type='text/javascript'>
    //<![CDATA[
    var newwindow;
    function popuplink(url)
    {
    newwindow=window.open(url,'name','height=500,width=700');
    if (window.focus) {newwindow.focus()}
    }
    //]]>
    </script> <!--TECHGYO POPUP CODE ENDS-->

    The Popup link is the function name that we are going to use while placing the link to a text.

    500 is the height of the popup window.
    700 is the width of the popup window.

    While adding hyperlink to a text use the function name “Popup link” and then the url as given below.

    <a href="JavaScript:popwindow('ADD LINK HERE');">Open a popup window</a>

    Try It: Click to here

    popup link


     
    You are done:) enjoy!!

    Latest

    Secure Your Internet With The Exclusive Hacker-Proof Quantum Internet

    Everyone dreams of being 100% sure about the Internet is safe. Unfortunately, the Internet like any other entity is prone to various...

    The ultimate guide to REMPL FOLDER.

    What is Rempl Folder? Windows 10 Updates wield certain Files and Folders to guarantee that any updates launched by...

    Kindle Vs Nook – Don’t Buy Without Reading This Comparison

    Kindle vs Nook? This is a common question that is marking a steady ground in the minds of the e-readers for whom,...

    Guess What Happened After Start-Up Astra Launched Its Rocket In Alaska!

    The first orbital mission by start-up Astra failed as their Rocket 3.1 couldn’t reach the orbit. The rocket...

    Internet Urge! Remote Schooling Out Of Reach For Many Students

    Internet-dependent teaching or online education is the only key to the right education for students of all ages, while the pandemic is...

    More Like This