Saturday, July 4th, 2009

Archive for November, 2008

AutoLogin (’Remember Me’) using cookies

Are you tired of typing your username & password each time you have to login to the Control Panel of your site? Check this tutorial that we’ll give you an idea of how you can implement an auto-login feature.

Read more

A basic JS function to Show/Hide (Toggle) an Element

This is a simple JS function to show/hide an element. The element is hided by setting its ‘display’ CSS attribute to none. When the element is showed back the ‘display’ attribute is set to block.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>A Basic Show/Hide JavaScript Function</TITLE>
<META NAME="Author" CONTENT="Bit Repository">

<META [...]

Read more

Basic usage of the JS onChange() event handler

The onChange() event handler is used when the value of an input or select field is changed and based on that change an event is triggered: a form validator, a URL redirection based on the selected value from the dropdown etc.

Read more

Dynamic DropDown with countries

Hi,
This is a snippet that creates a dynamic dropdown menu with countries. The select is created from the $countries array. You can set a country that will be selected automatically when the drop down is loaded. This can be done by editing the variable $default. You can specifying the key from the array (i.e.: 220 [...]

Read more

Creating the array_isearch() function

Hello coders,
We know that arrray_search() is a function used to search the array for given value and return the corresponding key. This works fine in a case sensitive mode, but in an insensitive one we have a problem. If we search for ‘blue’ and there is a value in array ‘BLUE’, our array_search() will return [...]

Read more

How to create a word popularity script

This is an useful function that calculates the popularity of words from a specific text.

Read more

Dynamic dependant DropDown List (US States & Counties)

This is a dynamic Dependant DropDown list with US States & Counties. If a state is selected, a drop down with its counties appears.

Read more