Category : username

I’m trying to validate username using the following JavaScript functions: function checkUsername(un){ var unameExp=/^[a-z]w{3,9}$/i; if (un.length==0){ msg=""; unFlag=false; } else if (!unameExp.test(un)){ msg="Invalid Username"; clr="red"; unFlag=false; } else{ msg=""; unFlag=true; } document.getElementById(‘usernameMsg’).style.color=clr; document.getElementById(‘usernameMsg’).innerHTML=msg; } function checkUserInputs(){ document.signup.JSEnabled.value="TRUE"; return (nFlag && unFlag && pFlag && cpFlag); } Ignore the other flags in checkUserInputs() its just to ..

Read more

I am developing a chrome extension where in I want to greet the user by user’s first name. I am trying to get user’s information if they have logged into the browser. I have been trying to get user’s first and last name. using the chrome.identity.getProfileUserInfo(function(userInfo) { console.log(JSON.stringify(userInfo)); }); I have also added "permissions": ["storage","identity","identity.email"], ..

Read more