The following is a snippet of my form
<span style="font-weight: bold;" id="program_name_1">Basics</span>
<form accept-charset="UTF-8" action="/programs/1" class="edit_program" data-remote="true" id="edit_program_1" method="post">
<input id="program_name" name="program[name]" size="30" type="text" value="Basics" />
</form>
Here is the jquery I'm trying to use
function set_updated_program_values(id)
{
$('#program_name_' + id).html($('#edit_program_' + id + ' input:#program_name').val());
alert('new name is ' + $('#edit_program_' + id + ' input:#program_name').val());
}
The span tag isn't being updated, and the alert says it is undefined. Am I doing something wrong here?