I'm using this Jquery function to encode, letter by letter, the users password in my page.
function encoding() {
var passlc = $("#password").val().trim();
for (var i = 0, $len = passlc.length; i < $len; i++) {
var lone = passlc[i].pass('encode');
$("#passwordenc").append(lone);
}
This method retus the encoded password inside one div #passwordenc, so, anyone who access the page source code can view this even if I hide the element.
My idea to store the value without this problem is using Jquery data(), but I don't know how can I store multiple values in the same variable.
First test:
function encoding() {
var passlc = $("#password").val().trim();
for (var i = 0, $len = passlc.length; i < $len; i++) {
var lone = passlc[i].pass('encode');
$("#passwordenc").data({"pass":lone});
}
When I get the value, only the last caracter retu from data.
How can I store all values to retu later?
Thanks!
