Advertisement
LoonerSF

phone email windows

Aug 16th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function createPhoneWindow(){
  2.         var layoutPhone = Ti.UI.createView({
  3.             width : contentWidth - 20,
  4.             height : contentHeight - 300,
  5.             layout : 'horizontal',
  6.             backgroundColor : '#ddd',
  7.             top : 20
  8.         });
  9.        
  10.         var lblPhone = Ti.UI.createLabel({
  11.             text : 'Teléfono',
  12.             width : 'auto',
  13.             height : 30,
  14.             font : {fontSize : 12}
  15.         });
  16.         layoutPhone.add(lblPhone);
  17.        
  18.         var txtPhone = Ti.UI.createTextField({
  19.             width : contentWidth/2,
  20.             height : 30,
  21.             font : {fontSize : 12},
  22.             borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
  23.             keyboardType : Ti.UI.KEYBOARD_NAMEPHONE_PAD
  24.         });
  25.         layoutPhone.add(txtPhone);
  26.        
  27.         txtPhone.addEventListener('blur', function(e){
  28.             objReservacion.phone=txtPhone.value;
  29.             alert(objReservacion.phone);
  30.         });
  31.        
  32.         self.add(layoutPhone);
  33.     }
  34.    
  35.     function createEmailWindow(){
  36.         var layoutEmail = Ti.UI.createView({
  37.             width : contentWidth - 20,
  38.             height : contentHeight - 300,
  39.             layout : 'horizontal',
  40.             backgroundColor : '#ddd',
  41.             top : 20
  42.         });
  43.        
  44.         var lblEmail = Ti.UI.createLabel({
  45.             text : 'Email',
  46.             width : 'auto',
  47.             height : 30,
  48.             font : {fontSize : 12}
  49.         });
  50.         layoutEmail.add(lblEmail);
  51.        
  52.         var txtEmail = Ti.UI.createTextField({
  53.             width : contentWidth/2,
  54.             height : 30,
  55.             font : {fontSize : 12},
  56.             borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
  57.             keyboardType : Ti.UI.KEYBOARD_EMAIL
  58.         });
  59.         layoutEmail.add(txtEmail);
  60.        
  61.         txtEmail.addEventListener('blur', function(e){
  62.             objReservacion.email = txtEmail.value;
  63.             alert(objReservacion.email);
  64.         });
  65.        
  66.         self.add(layoutEmail);
  67.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement