Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

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

Everyone's tags (1)
50
Views
0
Helpful
0
Replies
CreatePlease to create content