Archive for June, 2011

Generate Random 10 Digit Number in PHP

The application I’m developing requires a random 10 digit number as a bar code on season pass. A simple way to create a unique number is to use the following code: Here’s whats happening with the code: The outer portion “substr” is used to chop down the random number we create to 10 characters. You [...]

Read more

Legend HTML Tag Word Wrapping Problem

There is an issue with the way Firefox 3 and 4 handles a long string of text in the HTML form tag “Legend”. With a long string of text in the legend, the element will completely ignore any width property associated with it. The only way to break a line in the legend element is [...]

Read more

jQuery Validation Word Count Custom Method

The jQuery Validation plugin is one of the best ways to validate your forms client side. It has built in functions to check the maximum amount of characters allowed in each form field, which works great in many situations. However for a project I am currently working on the client requires text areas to have [...]

Read more