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

Cisco CT5760 Webauth login.htm args.wlan etc

Hi All,

Not sure how many people were using it but with the non-IOS train of WLC code, under webauth you could put script like the following in your login.html:

 

    function writeAP() {
        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);
            }
        var APmac = args.ap_mac;
        document.write(APmac);
        }

 

    function writeSSID() {
      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);
      }
        var wlan = args.wlan;
        document.write(wlan);
        }

 

The main point being that you could extract details like the args.wlan (the SSID) and use it in the HTML or even to make decisions (ie we had a very different page display for our Welcome SSID vs our Guest SSID, one required auth while the other just made you accept the T&C's). I have just transferred our same webauth bundle to our new CT5760 WLC and although I can get webauth to work (though my testing is far from complete), I just noticed that all the args.[argname] are all coming out as undefined which is stuffing up my html output. There are some fairly simple ways to get around this but I'm wondering if anyone knows if the API has just changed, or has it been removed completely. I guess based on the current webauth bundle for the 5760 we know that args.switch_url and args.statusCode do work. Maybe they changed the name of wlan to ssid, I just wish Cisco would publish such info rather than forcing me to write ugly html hacks to list all the new valid arguments. Cause my ability to write html sux very badly.

Thanks,

Kevin-John Beasley

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card