having fun with code

Tag Archives: id

Finding duplicate ID’s on an HTML page

Looks like sometimes we forgot element ID’s are meant to be unique on a HTML page. Here is a little bit of code I just wrote to find duplicate ID’s on a page (run the code on your browser’s javascript console): var idList = {}; var nodes = document.getElementsByClassName(''); for (var i in nodes) { [...]

Getting unique timestamps in Javascript

Sometimes, when you want to generate unique id’s or similar, it is very common to use the current date as unix timestamp (new Date().getTime() or $time() in Mootools). The problem is that if we get the current timestamp multiple times too fast, it may happen that we get exactly the same value. Actually, this will [...]

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info

PromoteJS

JavaScript JS Documentation