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 >
Text File  |  2002-06-28  |  2KB  |  124 lines

  1. /** Data for the drop downs 
  2.     note:
  3.          the country, language and birth year lists are in their own files due to size
  4. **/
  5. var genderList = new Array();
  6. function initGender()
  7. {
  8.     genderList[0] = new FormDataItem( "", field_gender_default_text);
  9.     genderList[1] = new FormDataItem( field_gender_0_value, field_gender_0_text);
  10.     genderList[2] = new FormDataItem( field_gender_1_value, field_gender_1_text);
  11. }
  12.  
  13. /** Common Form Items **/
  14. var fiEmail, fiPassword, fiLanguage, fiCountry, fiPostal, fiGender, fiBirthYr;
  15. function initFormItems()
  16. {
  17.     fiConfPassword   = new FormItem(
  18.         "confirm_password",
  19.         field_passwordconfirm_label,
  20.         "",
  21.         "",
  22.         "password",
  23.         field_passwordconfirm_size,
  24.         "\\s*\\S.{4,}\\S\\s*",true,null);
  25.     fiConfPassword.maxlength=field_passwordconfirm_maxlength;
  26.     fiConfPassword.validate = confirmPwdValidation;
  27.  
  28.     fiContactMe     = new FormItem(
  29.         "contactme",
  30.         "",
  31.         contactme_description,
  32.         contactme_default,
  33.         "checkbox",null,"",true, null);
  34.  
  35.     fiParental     = new FormItem(
  36.         "password",
  37.         field_parental_label,
  38.         "",
  39.         "",
  40.         "password", field_parental_size,"\\s*\\S.{4,}\\S\\s*",true,null);
  41.     fiParental.maxlength=field_parental_maxlength;
  42.  
  43.     fiEmail = new FormItem(
  44.         "user_name",
  45.         field_email_label,
  46.         "",
  47.         "",
  48.         "text",
  49.         field_email_size,
  50.         "[\\w]+[\\w_\\.]*\@[\\w]+[\\w_\\.]*[^\\.]",
  51.         true,
  52.         null);
  53.     fiEmail.maxlength = field_email_maxlength;
  54.  
  55.     fiPassword = new FormItem(
  56.         "password",
  57.         field_password_label,
  58.         "",
  59.         "",
  60.         "password",
  61.         field_password_size,
  62.         ".{6,}",
  63.         true,
  64.         null);
  65.     fiPassword.maxlength = field_password_maxlength;
  66.  
  67.     fiLanguage = new FormItem(
  68.         "language",
  69.         field_language_label,
  70.         "",
  71.         "",
  72.         "select-one",
  73.         field_language_size,
  74.         "[\\w]{2,5}",
  75.         true,
  76.         languageList);
  77.  
  78.     fiCountry = new FormItem(
  79.         "country",
  80.         field_country_label,
  81.         "",
  82.         "",
  83.         "select-one",
  84.         field_country_size,
  85.         "[\\w]{2}",
  86.         true,
  87.         countryList);
  88.  
  89.     fiPostal = new FormItem(
  90.         "postalcode",
  91.         field_postalcode_label,
  92.         "",
  93.         "",
  94.         "text",
  95.         field_postalcode_size,
  96.         "^\\s*[\\d]{5}\\s*$",
  97.         true,
  98.         null);
  99.     fiPostal.maxlength=field_postalcode_maxlength;
  100.     fiPostal.validate = postalCodeValidation;
  101.  
  102.     fiGender = new FormItem(
  103.         "gender",
  104.         field_gender_label,
  105.         "",
  106.         "",
  107.         "select-one",
  108.         field_gender_size,
  109.         "",
  110.         false,
  111.         genderList);
  112.  
  113.     fiBirthYr = new FormItem(
  114.         "birthyear",
  115.         field_birthyear_label,
  116.         "",
  117.         "",
  118.         "select-one",
  119.         field_birthyear_size,
  120.         "",
  121.         false,
  122.         yearList);
  123. }
  124.