I have a dropdown cell and after clicking on an item i want to add a row to a html table. I did this using javascript: (addRowToTable is a basic javascript function)
<script type='text/javascript'>
$(document).ready(function() {
$('#locations').change(function() {
if (this.selectedIndex != 0) {
var support = new Array("True", "False");
addRowToTable(this.value, support , "Table");
this.remove(this.selectedIndex);
this.selectedIndex = 0;
}
});
});
</script>
but i now realized that some of the data that i need to show in the new table row, i don't have on the client side so i need to somehow:
- Pass the selected value to the server (controller action) and then get back the rest of the data attributes refresh the html table (ajax) with the new value on the client side after get the full data back on the server.
Does anyone have any examples of trying to do something like this?