function getMarkup(topic_id) { var reply_box = $('#z_content'); reply_box.attr('disabled', 'disabled'); // disable reply box until have markup $.get(URL_for_markup, {topic_id : topic_id}, function(markup) { reply_box.text(markup); reply_box.attr('disabled', ''); }}