Skip to content
Alessandro Lacava
  • Home
  • Blog
  • Articles
  • Talks

Category 50 posts

Programming

Writing about Programming.

CSS16 Feb 2007

How to display an element in the center of the browser

Sometimes you might need to display an element, for example a div, in the center of the browser. Here is an example of how you can do it using JavaScript and CSS. This code assumes you have…

Read article ↗
JavaScript16 Jan 2007

How to detect the selected checkboxes using JavaScript

Here is an example of how you can retrieve the selected checkboxes using a JavaScript function: In the example above, clicking the button displays the selected checkboxes in an alert.

Read article ↗
CSS24 Nov 2006

How to add scrollbars to a block (e.g. a <div> element)

If you need to customize a list box, the HTML element might not be enough. In that case, you might want something that simulates the behaviour of . Here is the code for a custom list box:…

Read article ↗
JavaScript20 Nov 2006

Sorting an array of objects with the sortBy method of Prototype

Here is an example of how easy it is to sort an array of objects using the Enumerable.sortBy method of the Prototype framework:

Read article ↗
← Newer posts
Page 8 of 13
Older posts →
Alessandro Lacava

Software, words, and the ideas in between.

GitHub ↗LinkedIn ↗X / Twitter ↗Email ↗
© 2026 Alessandro Lacava
RSS feedPrivacy and cookies