how to check loginname field onfocus - Forum - Rollbase - Progress Community

how to check loginname field onfocus

 Forum

how to check loginname field onfocus

  • IN PORTAL :  Get text enter mail id besides the login field when click login Name field, same way Password field also need to show some text.how to write JavaScript, below portal login page.

  • Hi,

    Try the following script in login Page-

    <script>

    $(document).ready(function() {

     $(document.loginForm.loginName).focus(function() {$(document.loginForm.loginName).after("<span>Enter Email Id</span>")});

     $(document.loginForm.password).focus(function() {$(document.loginForm.password).after("<span>Enter Password</span>")});

     $(document.loginForm.loginName).focus();

    });

    </script>