home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 January
/
soundCD_1.03.iso
/
players
/
RealPlayerOne
/
RealOnePlayerV2GOLD.exe
/
login.dcp
/
data
/
form_elements.js
< prev
next >
Wrap
Text File
|
2002-06-28
|
2KB
|
124 lines
/** Data for the drop downs
note:
the country, language and birth year lists are in their own files due to size
**/
var genderList = new Array();
function initGender()
{
genderList[0] = new FormDataItem( "", field_gender_default_text);
genderList[1] = new FormDataItem( field_gender_0_value, field_gender_0_text);
genderList[2] = new FormDataItem( field_gender_1_value, field_gender_1_text);
}
/** Common Form Items **/
var fiEmail, fiPassword, fiLanguage, fiCountry, fiPostal, fiGender, fiBirthYr;
function initFormItems()
{
fiConfPassword = new FormItem(
"confirm_password",
field_passwordconfirm_label,
"",
"",
"password",
field_passwordconfirm_size,
"\\s*\\S.{4,}\\S\\s*",true,null);
fiConfPassword.maxlength=field_passwordconfirm_maxlength;
fiConfPassword.validate = confirmPwdValidation;
fiContactMe = new FormItem(
"contactme",
"",
contactme_description,
contactme_default,
"checkbox",null,"",true, null);
fiParental = new FormItem(
"password",
field_parental_label,
"",
"",
"password", field_parental_size,"\\s*\\S.{4,}\\S\\s*",true,null);
fiParental.maxlength=field_parental_maxlength;
fiEmail = new FormItem(
"user_name",
field_email_label,
"",
"",
"text",
field_email_size,
"[\\w]+[\\w_\\.]*\@[\\w]+[\\w_\\.]*[^\\.]",
true,
null);
fiEmail.maxlength = field_email_maxlength;
fiPassword = new FormItem(
"password",
field_password_label,
"",
"",
"password",
field_password_size,
".{6,}",
true,
null);
fiPassword.maxlength = field_password_maxlength;
fiLanguage = new FormItem(
"language",
field_language_label,
"",
"",
"select-one",
field_language_size,
"[\\w]{2,5}",
true,
languageList);
fiCountry = new FormItem(
"country",
field_country_label,
"",
"",
"select-one",
field_country_size,
"[\\w]{2}",
true,
countryList);
fiPostal = new FormItem(
"postalcode",
field_postalcode_label,
"",
"",
"text",
field_postalcode_size,
"^\\s*[\\d]{5}\\s*$",
true,
null);
fiPostal.maxlength=field_postalcode_maxlength;
fiPostal.validate = postalCodeValidation;
fiGender = new FormItem(
"gender",
field_gender_label,
"",
"",
"select-one",
field_gender_size,
"",
false,
genderList);
fiBirthYr = new FormItem(
"birthyear",
field_birthyear_label,
"",
"",
"select-one",
field_birthyear_size,
"",
false,
yearList);
}