Security

Reply
Occasional Contributor II

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

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.

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: