how to bring append values in dropbox

Viewed 18
<html>
<head style="color:white;">
<title>
box count
</title>
<script>
function appendRow()
{
var x = document.getElementById('camnos').value;
var d = document.getElementById('myList');
alert('please enter the ip address');

for(var i=0; i < x; i++)
{
    var input = document.createElement('input'); 
    input.type = "text"; 
    input.id = "camera"+i;
     
    d.appendChild(input);
}
}
 //document.getElementById("btnSave").style.visibility = "hidden";
 function enterkey()
 
 {
var parent = document.getElementById('div id');
var childNodes = parent.childNodes;
for(var i = 0, len = childNodes.length;i<len;i++){
    if(childNodes[i].id === "camera"+i) {  
var number=document.getElementById("camera"+i).value;  
var x = document.getElementById("zonelist");
  var option = document.createElement("option");
  option.text = number;
  x.add(option);
  
}  
}
    
}




</script>
</head>
<body style="background-color:#00008B;">
        <div style="color:white;">ZONE NO</div>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="number" name="zone id" minlength="1" maxlength="20" required>
       
          &nbsp;&nbsp;&nbsp;<button type="submit">SUBMIT</button>
        <br>
        <div style="color:white;">NO OF CAMERA</div>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input id="camnos" type="number" name="zone id" minlength="1" maxlength="20" required>
       
        &nbsp;&nbsp;&nbsp;
        <button id="appendbutton" onclick="appendRow()">SUBMIT</button> 

        <div id="myList"> </div>
        
        <button id="btnSave" onclick="enterkey()" type="button" >ENTER</button>
        
<h3>
<div style="color:white;">ZONE CAMERA MAPPING</div>
</h3>

<b style="color:white;"> ZONE NO 1 </b>
<select id = "zonelist">
<option> ---Select Camera--- </option>

</select>
</body>
</html>

i want to add the append values in dropdown as options for php, pls help me with some other to . the requirement is to append the empty box, then values will be in the append empty box, the entered values has to be displayed in the dropdown as options. And to map the option in other dropbox for further process.

0 Answers
Related