Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).

using jQuery (focus text) in header HTML (WEB-LOGIN FORM)

This thread has been viewed 3 times
  • 1.  using jQuery (focus text) in header HTML (WEB-LOGIN FORM)

    EMPLOYEE
    Posted Oct 06, 2017 01:24 PM

    Hello Gurus

    I´m using a weblogin with access-code (just validate username) I realize that CPPM guest manager support Jquery so I'm trying to use a JQuery code that makes when a textbox lose focus will validate that the content of this element is a correct  (username). This JQuery works as expected in an environment diferent than ClearPass but in CPPM doesnt works.

     

    The code I am using is as follows:

    $(document).ready(function(){

     

                    jQuery.fn.extend({

                                   PatronRut: function () {

                                                   // Funciona **works**

                                   }

                    });

     

                    jQuery.fn.extend({

                                   RutValido: function () {

                                                   // Funciona **works**

                                   }

                    });

                   

    // No funciona ***not working**

                    $('#username').focusout(function() {

                                   var error = $('#usernError');

                                   var usernametxtbx = $(this);

                                   var texto = usernametxtbx.val();

     

                                   if(texto.length > 0 && usernametxtbx.PatronRut() && usernametxtbx.RutValido())

                                   {

                                                   error.hide();

                                   }

                                   else{

                                                   error.text('Rut invalido!');

                                                   error.show();

                                   }

                                  

                    });

                   

    });

     

    maybe you can give some TIps.

     

    Thanks you a lot.