Form Text

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Form Text

Post by iknownothing »

Hey Guys,
I was wondering if anyone could give me a hand of point me in the right direction for a few things. When typing in a date field, I want "/" to appear where appropriate (after numbers 2 and 4) when user only types in the numbers. The same goes for a phone number, to add ( ) to indicate area code, and certain spacing after a certain number of numbers.

I also am looking into the standard value of a text box (in light grey usually) that disappears when clicked on.

Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

onkeydown, onkeyup, onkeypress are the events you will need to look into.
Post Reply