How to make a simple pop up in Javascript.

(Behind the sillyness – “Don’t click me”)

If you’ve been on my website lately, you may have seen the “don’t click me” pop-up button. If not, here’s what it takes you to. Here’s how to do it, if you’re interested, or just bored an reading the shittiest blog on the net.

Make a button.

First step, is to make a button. You can use <button> for this, here’s some example code for a button.
<button onclick="openWindow();">Don't click me</button>

Which brings us to the onclick element. It tells the browser to do (="WHATEVER();") something, when it’s clicked. In this case it will open a pop-up window. Now you must "define” what “openWindow” does. Here’s how.

We will make a new function. In a .js file, or in the <script> part of your website document, we will put function openWindow(). Now to contain the code, we will put { and } around the stuff.
Here’s the code, with messages saying what stuff does. You can remove anything that starts with “//”.


The final code / TL;DR:
function openWindow() var i, l, options = [{

       value: ‘first’,

       text: ‘First’

    }, {

       value: ‘second’,

       text: ‘Second’

    }],

    newWindow = window.open(“https://birddev.net/rick.html”, null, “height=200,width=400,status=yes,toolbar=no,menubar=no,location=no”);  }

// Replace my page with your URL. Unless you wanna rickroll people too.

function setValue(value)

  document.getElementById(‘value’).value = value;

} // Sets the value.

Have fun ^^
– Z

(P.S. this is my first “tutorial” of sorts, and i am also a beginner, so that’s why it kinda sucks.)

To desktop view or not to desktop view?

So, it seems the homepage looks *very* awkward on big screens.

This is most likely because my code editor, Visual Studio Code, has a live preview extension that i had window-ed the size of a average phone, and that’s how i was previewing my work. Hence why it looks nice on a phone and not on a desktop. Because i optimized- rather built the page for mobile.

Now, i can make a desktop-friendly UI, as i have in the past. But then it looks weird on phones.
It’s a paradox of sorts- i either keep a mobile friendly design, but have it look shit on desktops and (some) tablets, or have a desktop friendly UI that looks not shitty, but not the best on mobile.

Since i’m new to making my own CSS / HTML from scratch, having started March of this year, i can’t really make a “dynamic view” page.
Here’s a preview of some stuff i’ve been working on though.
Since i’m new to making my own CSS / HTML from scratch, having started March of this year, i can’t really make a “dynamic view” page.
Here’s a preview of some stuff i’ve been working on though.

Which..

Yeah, i’m working on that too. I’m working on a lot right now. Including something very awesome i’ll be launching soon… AN ACTUAL PROJECT THAT ISN’T USELESS!!!!!

Anyways, bye for now :3
– Z