Feeds:
Posts
Comentários

Arquivo da categoria ‘Javascript’

Field formating is a feature that all client application must have.
Specially with web application it´s not “cool” to create masks and some interface features, at least for back end developers.
So, that’s a good tool named: jQuery, it’s a javascript library, easy to use and very simple.
This sample, was to create a mask for Brazilian fields, [...]

Ler o post por completo »

Selecionando uma opção baseado no valor.

/**
* retorna o indice do objeto [option] referente ao valor [value]
* caso nao encontre, retorna 0 (zero)
*/
function getOptionIndexFromValue(options, value) {
for (i = 0; i < options.length; i++) {
if (options[i].value == value) {
return i;
}
}
return 0;
}

Pode ser útil com AJAX.

Ler o post por completo »