I came across this page and reading the example codes. I don't understand how the following line works in the the codes. How did it assign the value "\nlogin:" to the "error" variable when the form value is empty?
The line of code:
error+=f.login.value==''?'\nlogin':'';
The whole example code is under "2. Javascript is an enhancement, not a secure functionality".
Thanks for the help.