function mark(id, title, marks) { try { $('
').dialog({ modal: true, title: 'Mark submission', buttons: { 'Submit': function() { $('#submit-form').submit(); $(this).dialog('close'); }, 'Cancel': function() { $(this).dialog('close'); } } }); } catch (e) { alert(e); } }