Skip to content

Instantly share code, notes, and snippets.

@prasofty
Created June 24, 2015 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prasofty/76a5ae62873ff42b43e2 to your computer and use it in GitHub Desktop.
Save prasofty/76a5ae62873ff42b43e2 to your computer and use it in GitHub Desktop.
for ie9 does support xhr headers
var $note_html = $(data);
if($note_html.hasClass('user_prospects_note')) {
$('#prospectsEmptyNotes').remove(); //if this is first note, delete empty node.
if($('#'+$note_html.attr('id')).length == 0) {
$('#user_prospects_notes .sp-container').prepend(data);
} else {
$('#'+$note_html.attr('id')).replaceWith(data);
}
$('#as-modal').modal('hide');
} else {
$("#as-modal").html(data);
}
if(xhr.getResponseHeader('blockId') != null) {
$('#prospectsEmptyNotes').remove(); //if this is first note, delete empty node.
if($(xhr.getResponseHeader('blockId')).length == 0) {
$('#user_prospects_notes .sp-container').prepend(data);
} else {
$(xhr.getResponseHeader('blockId')).replaceWith(data);
}
$('#as-modal').modal('hide');
} else {
$("#as-modal").html(data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment