At this point, I’m learning how to launch a pop-up

At this point, I’m learning how to launch a pop-up

March 3, 2006 · 1 min read
post

What’s more: I’m not ashamed to admit it. :P
The webmaster world is a never-ending cycle of learning and relearning things… maybe that’s why I like it so much. Some even take pride in teaching me something I didn’t know (hey Rodrigo?), while others ask me to keep writing more and listening to less music (hey Tito Tommy?).

Anyway, back to the point: launching pop-up windows with JavaScript. It turns out that, regardless of the debate about whether pop-ups should be used at all, there’s a problem that systematically corrupts them, makes them harmful, attacks both advanced and novice users during navigation, confuses search engines, and generates noise in the code. The issue is that, although there are several ways to launch a pop-up using JavaScript, the most commonly used ones are the wrong ones.

The correct way to launch a pop-up window with JavaScript

The following is the code you should use to launch a pop-up:
<a href="https://albertlg.com/index.htm" target="_blank" onClick="window.open(this.href, this.target, 'width=300,height=400'); return false;">Launch correctly</a>
Launch correctly


Simply change href="https://albertlg.com/index.htm" to the name of the .htm file you want to open in the new window, and adjust the width and height values according to the desired dimensions (in pixels).

For more information: NSU.

Albert López
Authors
SEO, Content Marketing & LLMs (IA) Advisor
Desde 1998 vivo en la intersección entre tecnología, contenidos y búsqueda. He sido diseñador, programador, SEO y emprendedor en proyectos como Solostocks, Softonic, Uvinum y Drinks&Co. Hoy soy socio y SEO Manager en Mindset Digital, donde impulso estrategias de SEO para LLMs y sigo explorando nuevas ideas y side projects. Siempre aprendiendo, siempre optimizando.
comments powered by Disqus