Enter code here...<html lang="en">
<head>
<meta charset="utf-8" />
<title>Get Current Running Config</title>
</head>
<body>
<h2>Get Current Running Config</h2>
Choose a Device Name<br>
<select name="selectFrequency" id="selectFrequency">
<option value="">- Select -</option>
{{for tmp_name,tmp_id in zip(names,id):}}
<option value="{{=tmp_id}}">{{=tmp_name}}</option>";
{{pass}}
</select>
<div id="resultip"></div>
<script>
$(document).ready(function(){
$("#selectFrequency").change(function() {
var selected = $(this).val();
$.ajax({
url: "get_config_details",
type: "GET",
data: {id : selected},
success: function(data) {
$('#resultip').html(data);
}
});
});
});
</script>
</body>
</html>
I get the drop down populated correctly with all the device names.