- info.innerHTML = String.format(
- '<strong><%:SSID%>:</strong> %s | ' +
- '<strong><%:Mode%>:</strong> %s<br />' +
- '<strong><%:BSSID%>:</strong> %s | ' +
- '<strong><%:Encryption%>:</strong> %s',
- iw.ssid, iw.mode, iw.bssid,
- iw.encryption ? iw.encryption.description : '<%:None%>'
- );
+ {
+ if (is_assoc)
+ info.innerHTML = String.format(
+ '<strong><%:SSID%>:</strong> %s | ' +
+ '<strong><%:Mode%>:</strong> %s<br />' +
+ '<strong><%:BSSID%>:</strong> %s | ' +
+ '<strong><%:Encryption%>:</strong> %s',
+ iw.ssid, iw.mode, iw.bssid,
+ iw.encryption ? iw.encryption.description : '<%:None%>'
+ );
+ else
+ info.innerHTML = '<em><%:Wireless is disabled or not associated%></em>';
+ }