I have this function, which loads a select from a database.
function Competition() {
$(document).ready(function() {
$.ajax({
url: "load-comp.php",
cache: false,
success : function(html) {
// something here
}
});
EditRow();
});
}
I need to put that select inside confirmEdit (in the second td).
EditRow() {
var confirmEdit = '<tr class="editable" id=" '+ id +' ">
<td><input type="text" value="' + name + '" /></td>
<td> ' + /* function result goes here */ + ' </td>
<td><input type="text" value="' + data + '" /></td>
<td>' + saveCancel + '</td>
</tr>';
}
So how do I save the result produced by the Competition() function inside a variable so I can use it in the EditRow() function?