Posted on: 1/14/2014 4:54:28 PM | Views : 644

I have 3 textboxes. Firstname, Lastname and username. As user types the Firstname and Lastname, I call FillUserName() function, which populates the username textbox.
Now, the user can further edit their username (after FillUserName() function prepopulates for them). Once the user is done editing the username, and then goes on to edit their First/Last names, I don't want Javascript to update their username anymore. Once the user has manually updated their username, I don't want Javascript to edit it anymore.
I think I need to set some sort of flag onKeyUp of the username textbox, which will prevent the FillUserName() function from being called. Can anyone guide me in the right direction on how I can achieve this? 
This is what I have so far:
function FillUserName() { input = document.getElementById('txtFName').value + document.getElementById('txtLName').value; document.getElementById('txtUserName').value = input.substr(0,15) ...

Go to the complete details ...