3 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
4 <link rel="stylesheet" href='stylemain.css' type='text/css'>
5 <link rel="stylesheet" href='colors.css' type='text/css'>
6 <script language="javascript" src="util.js"></script>
7 <script language="javascript">
9 var state = '<%ejGet(dnsRefresh)%>';
11 var code = 'location="dnscfg.cgi?dnsRefresh=0"';
15 function hideDnsInfo(hide) {
16 var status = 'visible';
20 if (document.getElementById) // DOM3 = IE5, NS6
21 document.getElementById('dnsInfo').style.visibility = status;
23 if (document.layers == false) // IE4
24 document.all.dnsInfo.style.visibility = status;
29 function dnsClick(cb) {
30 if (cb.checked == true)
37 var loc = 'dnscfg.cgi?';
39 with ( document.forms[0] ) {
40 if (enableAuto.checked == false) {
41 if ( isValidIpAddress(dnsPrimary.value) == false ) {
42 alert('Primary DNS "' + dnsPrimary.value + '" has invalid IP address.');
45 loc += 'dnsPrimary=' + dnsPrimary.value;
46 if (dnsSecondary.value != '') {
47 if ( isValidIpAddress(dnsSecondary.value) == false ) {
48 alert('Secondary DNS "' + dnsSecondary.value + '" has invalid IP address.');
51 loc += '&dnsSecondary=' + dnsSecondary.value;
54 loc += '&dnsSecondary=' + '0.0.0.0';
55 loc += '&dnsDynamic=0';
56 loc += '&dnsRefresh=1';
59 loc += 'dnsPrimary=' + '0.0.0.0';
60 loc += '&dnsSecondary=' + '0.0.0.0';
61 loc += '&dnsDynamic=1';
62 loc += '&dnsRefresh=0';
65 var code = 'location="' + loc + '"';
71 with ( document.forms[0] ) {
72 var auto = '<%ejGetOther(sysInfo, dnsAuto)%>';
73 var dns1 = '<%ejGetOther(sysInfo, dns)%>';
74 if ( dns1 == ' ' ) dns1 = '';
76 var dns2 = '<%ejGetOther(sysInfo, dns2)%>';
77 if ( dns2 == ' ' ) dns2 = '';
80 enableAuto.checked = true;
81 dnsPrimary.value = '';
82 dnsSecondary.value = '';
85 enableAuto.checked = false;
86 dnsPrimary.value = dns1;
87 dnsSecondary.value = dns2;
96 <body onLoad='frmLoad()'>
100 <b>DNS Server Configuration</b><br><br>
101 If 'Enable Automatic Assigned DNS' checkbox is selected, this router will accept
102 the first received DNS assignment from one of the PPPoA, PPPoE or MER/DHCP
103 enabled PVC(s) during the connection establishment. If the checkbox is
104 not selected, enter the primary and optional secondary DNS server IP addresses.
105 Click 'Save' button to save the new configuration. You must reboot the
106 router to make the new configuration effective.<br><br>
108 <table border="0" cellpadding="0" cellspacing="0">
110 <td valign="center" align="middle" colspan="2" width="30" height="30">
111 <input type='checkbox' name='enableAuto' onclick='dnsClick(this)'></td>
113 Enable Automatic Assigned DNS</td>
119 <table border="0" cellpadding="0" cellspacing="0">
121 <td>Primary DNS server:
123 <td><input type='text' name='dnsPrimary'></td>
126 <td>Secondary DNS server:
128 <td><input type='text' name='dnsSecondary'></td>
135 <input type='button' onClick='btnApply()' value='Save'>