home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 October / Gamestar_77_2005-10_dvd.iso / Programy / nsb-install-8-0.exe / chrome / aim.jar / content / aim / findAFriend1_1.js < prev    next >
Encoding:
JavaScript  |  2005-07-29  |  2.3 KB  |  75 lines

  1. /* 
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  *  
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *  
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  * 
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  * 
  20.  * Contributor(s): 
  21.  *   Ben Goodger (03/11/99)
  22.  */
  23.  
  24. //var bundle = srGetStrBundle("chrome://communicator/locale/profile/newProfile1_2.properties");
  25. //var detect = false;
  26.  
  27. // the getting procedure is unique to each page, since each page can different
  28. // types of elements (not necessarily form elements). So each page must provide
  29. // its own GetFields function
  30. function GetFields()
  31. {
  32.   var emailaddr = document.getElementById("emailaddr").value;
  33.   var rv = { 
  34.     emailaddr: { id: "emailaddr",      value: emailaddr       },
  35.  
  36.   }
  37.   return rv; 
  38. }
  39.  
  40. // the setting procedure is unique to each page, and as such each page
  41. // must provide its own SetFields function
  42. function SetFields(element,set)
  43. {
  44.   element = document.getElementById(element);
  45.   //dump("In SetFields(" + element + "," + set + ");\n");
  46.  if(element.id == "emailaddr")
  47.     element.value = set;
  48.  
  49. function setNext(thelabel){
  50.     parent.wizardManager.wizardMap[parent.wizardManager.currentPageTag].next=thelabel
  51.  
  52. function FAB_giveFocus(elementID){
  53.     dump("give FAB field Focus\n");
  54.     nameField = document.getElementById(elementID);
  55.     setTimeout("nameField.focus()",300);
  56. }
  57.  
  58. function validate(data)
  59. {
  60.   var emailaddr = document.getElementById("emailaddr").value;
  61.   if (!emailaddr) {
  62.     aimErrorBox(aimString("msg.enterValidEmail"));
  63.     return false;
  64.   }
  65.   if (!validateEmailAddress(emailaddr)) {
  66.     aimErrorBox(aimString("msg.enterValidEmail"));
  67.     return false;
  68.   }
  69.   parent.wizardManager.LoadPage('findAFriend1_1_0',false);
  70.   return true;
  71. }
  72.  
  73.