I got 2 Javascript functions
function populate_edit_form_template(template_container_id, tabpane_id, template_selector) {
if (!$(tabpane_id).hasClass("has_edit_template")) {
$(tabpane_id).addClass("has_edit_template");
var template_content = $(template_container_id).html();
$(tabpane_id).html(template_content);
$(tabpane_id).find(template_selector).attr("style", "");
}
}
and
function get_current_form_info(tabpane_id,form_id,process_url) {
var form_verification_data = {
"process_type":3,
"form_id": form_id,
};
$.post(process_url, form_verification_data, function (data) {
$(tabpane_id).append(data);
});
}
I'm running get_current_form_info first and populate_edit_form_template next, but somehow the latter gets executed first.
I was wondering:
1. How do I always force the $.post
to run first
2. Why the delay with $.post
?
Thanks for everyone's time