WIP: undo some formatting

This commit is contained in:
Yehuda Katz 2024-03-24 18:02:04 -04:00
parent 5a01d82b6f
commit 6d1332dbcd
No known key found for this signature in database
GPG Key ID: 6AFEF232927278DD

View File

@ -403,7 +403,8 @@
}
}
function parseQueryString(str) {
function parseQueryString(str)
{
str = str ? str : location.search;
var query = str.charAt(0) == "?" ? str.substring(1) : str;
var args = new Object();
@ -422,20 +423,25 @@
window.onload = calcOnLoad;
function toggleColumn(cb) {
var colName = "col_" + cb.id.substr(3);
function toggleColumn(cb)
{
var colName = 'col_'+(cb.id.substr(3));
var col = document.getElementById(colName);
if (cb.checked) {
col.style.display = "block";
} else {
col.style.display = "none";
col.style.display = 'block';
}
else {
col.style.display = 'none';
}
recreateTables(); /* because IE draws lines all over the place with border-collapse */
}
//-->
</script>
<style type="text/css">
H1 {
font-family: Arial, Verdana, sans-serif;
font-size: 18pt;
@ -450,6 +456,7 @@
font-size: 75%;
}
.label {
font-family: Arial, Verdana, sans-serif;
font-size: 60%;
@ -487,17 +494,21 @@
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
background-color:green;
}
</style>
</head>
<body>
<table width="100%">
<tr valign="top">
<tr valign=top>
<td>
<h1>Visual Subnet Calculator</h1>
<p>Enter the network you wish to subnet:</p>
<form name="calc" onsubmit="updateNetwork(); return false;">
<table cellspacing="0">
<tr>
<td class="label">IPv4 / IPv6</td>
@ -509,111 +520,48 @@
<input type="radio" name="version" value="4" checked />
<input type="radio" name="version" value="6" />
</td>
<td>
<input
type="text"
name="network"
size="15"
maxlength="45"
value="192.168.0.0"
/>
</td>
<td>
/<input
type="text"
name="netbits"
size="3"
maxlength="3"
value="16"
/>
</td>
<td>
<input type="submit" value="Update" />
<input
type="button"
value="Reset"
onclick="if (confirm('This will reset all subnet divisions you have made. Proceed?')) startOver();"
/>
<td><input type="text" name="network" size="15" maxlength="45" value="192.168.0.0"></td>
<td>/<input type="text" name="netbits" size="3" maxlength="3" value="16"></td>
<td><input type="submit" value="Update" />
<input type="button" value="Reset" onclick="if (confirm('This will reset all subnet divisions you have made. Proceed?')) startOver();">
</td>
</tr>
</table>
<p>
Show columns:
<input
type="checkbox"
id="cb_subnet"
checked
onclick="toggleColumn(this)"
/><label for="cb_subnet">Subnet address</label>
<input
type="checkbox"
id="cb_netmask"
onclick="toggleColumn(this)"
/><label for="cb_netmask">Netmask</label>
<input
type="checkbox"
id="cb_range"
checked
onclick="toggleColumn(this)"
/><label for="cb_range">Range of addresses</label>
<input
type="checkbox"
id="cb_useable"
checked
onclick="toggleColumn(this)"
/><label for="cb_useable">Useable IPs</label>
<input
type="checkbox"
id="cb_hosts"
checked
onclick="toggleColumn(this)"
/><label for="cb_hosts">Hosts</label>
<input
type="checkbox"
id="cb_divide"
checked
onclick="toggleColumn(this)"
/><label for="cb_divide">Divide</label>
<input
type="checkbox"
id="cb_join"
checked
onclick="toggleColumn(this)"
/><label for="cb_join">Join</label>
<p>Show columns:
<input type="checkbox" id="cb_subnet" checked onclick="toggleColumn(this)"><label for="cb_subnet">Subnet address</label>
<input type="checkbox" id="cb_netmask" onclick="toggleColumn(this)"><label for="cb_netmask">Netmask</label>
<input type="checkbox" id="cb_range" checked onclick="toggleColumn(this)"><label for="cb_range">Range of addresses</label>
<input type="checkbox" id="cb_useable" checked onclick="toggleColumn(this)"><label for="cb_useable">Useable IPs</label>
<input type="checkbox" id="cb_hosts" checked onclick="toggleColumn(this)"><label for="cb_hosts">Hosts</label>
<input type="checkbox" id="cb_divide" checked onclick="toggleColumn(this)"><label for="cb_divide">Divide</label>
<input type="checkbox" id="cb_join" checked onclick="toggleColumn(this)"><label for="cb_join">Join</label>
</p>
</form>
<p>
Click below to split and join subnets.<br />
If you wish to save this subnetting for later, bookmark
<a href="subnets.html" id="saveLink">this hyperlink</a>.
</p>
<p>Click below to split and join subnets.<br>
If you wish to save this subnetting for later, bookmark <a href="subnets.html" id="saveLink">this hyperlink</a>.</p>
</td>
<td align="right">
<a href="https://github.com/davidc/subnets"
><img
alt="Fork me on GitHub"
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_white_ffffff.png"
style="right: 0; top: 0; position: absolute"
/></a>
<a href="https://github.com/davidc/subnets"><img alt="Fork me on GitHub" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_white_ffffff.png" style="right: 0;top: 0;position: absolute;" ></a>
</td>
</tr>
</table>
<br />
<hr noshade color="black" size="1" />
<br />
<br>
<hr noshade color="black" size="1">
<br>
<table class="calc" cellspacing="0" cellpadding="2">
<colgroup>
<col id="col_subnet" />
<col id="col_netmask" style="display: none" />
<col id="col_range" />
<col id="col_useable" />
<col id="col_hosts" />
<col id="col_divide" />
<col id="col_join" />
<col id="col_subnet">
<col id="col_netmask" style="display: none">
<col id="col_range">
<col id="col_useable">
<col id="col_hosts">
<col id="col_divide">
<col id="col_join">
</colgroup>
<thead>
<tr>
@ -635,5 +583,6 @@
</tr-->
</tbody>
</table>
</body>
</html>