cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
400
Views
0
Helpful
2
Replies

Javascript loadaction() not working in default webauth customize wlc

dedar
Level 1
Level 1

I use the default webauth customize from the following link:

However, the javascript loadaction() function is not working:

function loadAction(){
     var url = window.location.href;
     var args = new Object();
     var query = location.search.substring(1);
     var pairs = query.split("&");
     for(var i=0;i<pairs.length;i++){
          var pos = pairs[i].indexOf('=');
          if(pos == -1) continue;
          var argname = pairs[i].substring(0,pos);
          var value = pairs[i].substring(pos+1);
          args[argname] = unescape(value);
     }


     document.forms[0].action = args.switch_url;

     // This is the status code returned from webauth login action
     // Any value of status code from 1 to 5 is error condition and user
     // should be shown error as below or modify the message as it suits
     // the customer

     if(args.statusCode == 1){
        alert("You are already logged in. No further action is required on your part.");
     }
     else if(args.statusCode == 2){
        alert("You are not configured to authenticate against web portal. No further action is required on your part.");
     }
     else if(args.statusCode == 3){
        alert("The username specified cannot be used at this time. Perhaps the user is already logged into the system?");
     }
     else if(args.statusCode == 4){
        alert("Wrong username and password. Please try again.");
     }
     else if(args.statusCode == 5){
        alert("The User Name and Password combination you have entered is invalid.  Please try again.");
     }

All username, password, or account input errors not in the local wlc authentication, will be redirected to authentication failed, which should display an alert according to the loadaction() function.

Is it that the WLC 9800 can't display the alert, or is the script wrong?

Device Type:

C9800-L-F-K9

 

IOS:

17.6.5

2 Replies 2

Scott Fella
Hall of Fame
Hall of Fame

Is there an popup blocker on the browser or something that might be preventing that page to appear?

-Scott
*** Please rate helpful posts ***

Hi Scot,

I have tried 3 browsers and 1 incognito, there should be nothing that blocks the popup, because I tried on smartphones and other devices the popup still doesn't work.

Salam,
Dedar

Review Cisco Networking for a $25 gift card