I am trying to use a select option and call different fuctions which a button click eg :
<select id="S3_Bucket_Actions" onchange="selectfunction()">
<option disabled="disabled" class="others" selected="selected">select one option</option>
<option value="listBucket">listBucket</option>
<option value="createBucket">createBucket</option>
<option value="doFileUpload">doFileUpload</option>
</select>
<input type='button' class='btn btn-default' value='Run tests' id='#s3-listBucket' />
<div id="buttonholder"></div>
<script>
function selectfunction() {
var selectoption = document.getElementById("S3_Bucket_Actions").value;
document.getElementById("buttonholder").innerHTML = "<input type='button' class='btn btn-default' value='Run All tests' id='s3-"+selectoption+"' />";
}
</script>
I want with each button click different functions related to different select options should be called. Can someone help ?