$(document).ready(function(){
$('b.edit').click(function(){
$(this).hide().after('<form action = "foo.php" method = post><input name = "field" type = "text" value = "'+$(this).attr('id')+'"/><input type="text" name = "period" class="editP" value="'+$(this).html()+'" /><input type = "submit" value = "Submit!!" /></form>');
$('.editP').focus();
});
$('.editP').live('blur', function(){
$(this).hide().prev('b.edit').html($(this).val()).show();
});
});