Skip to content

Commit

Permalink
Don't assume that the form is form zero https://sourceforge.net/p/web…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Sep 8, 2018
1 parent 7f0d401 commit 4eba9df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dhcpd/edit_group.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ return <<EOF
<script>
function setparent(sel)
{
var idx = document.forms[0].assign.selectedIndex;
var v = document.forms[0].assign.options[idx].value;
var idx = document.getElementsByName("assign")[0].selectedIndex;
var v = document.getElementsByName("assign")[0].options[idx].value;
var vv = v.split(";");
var parent = document.forms[0].parent;
var parent = document.getElementsByName("parent")[0];
parent.length = 0;
if (v==1) {
Expand Down
6 changes: 3 additions & 3 deletions dhcpd/edit_host.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ return <<EOF
<script type='text/javascript'>
function setparent(sel)
{
var idx = document.forms[0].assign.selectedIndex;
var v = document.forms[0].assign.options[idx].value;
var idx = document.getElementsByName("assign")[0].selectedIndex;
var v = document.getElementsByName("assign")[0].options[idx].value;
var vv = v.split(";");
var parent = document.forms[0].parent;
var parent = document.getElementsByName("parent")[0];
parent.length = 0;
if (v==1) {
Expand Down

0 comments on commit 4eba9df

Please sign in to comment.