Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
Created February 11, 2016 10:19
Show Gist options
  • Save rakhimoni/8f6aaaa76f137e1aa0e1 to your computer and use it in GitHub Desktop.
Save rakhimoni/8f6aaaa76f137e1aa0e1 to your computer and use it in GitHub Desktop.
How to retrive password value with four digits
var win = Ti.UI.createWindow({
backgroundColor : 'orange',
layout:'vertical'
});
var textField = Ti.UI.createTextField({
borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
color: '#336699',
top: 10, left: 10,
maxLength:4,
width: 250, height: 60,
passwordMask:true
});
win.add(textField);
var button = Titanium.UI.createButton({
title: 'Sent',
top: 100,
width: 100,
height: 50
});
button.addEventListener('click',function(e)
{
alert(textField.value);
});
win.add(button);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment