Archive for the ‘HTML’ Category

How to create a masked textbox using JavaScript

Wednesday, July 8th, 2009

This article demonstrates how to implement a masked input box or masked textbox using JavaScript. For example, let's imagine you have a simple HTML form and want to restrict the user to enter on numbers in a Telephone number field. The following code will demonstrate how to to capture the ...

How to get the parts of a URL in ASP.NET

Tuesday, June 30th, 2009

Every time I need to parse a URL or to extract parts of a URL in ASP.NET C# I can never remember what I did last time and need to refer to the documentation. So, in order to quickly answer the question "How can I get the elements of a ...

What’s the CSS equivalent for the nowrap attribute?

Sunday, June 1st, 2008

If you've been using the HTML attribute nowrap to prevent text from wrapping in table cells (for example), you can do the same via cascading style sheets (CSS).

Storing data in HTML elements using attributes

Sunday, June 1st, 2008

This article aims to illustrate 2 useful concepts. Firstly, to illustrate how to use the getAttribute and setAttribute methods of the DOM (Document Object Model) to "store" or "attach" data to DOM elements. Secondly, to show how this can be used as a way to "pass" data to Javascript event ...