summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-30 15:59:24 +0000
committerSarven Capadisli <csarven@status.net>2009-10-30 15:59:24 +0000
commite134f7ceb15435aaaeff65269a51c15a9a3552df (patch)
treeeb554b6fb530dab7a6a794951ba8713830b4c2dd
parent73e8c442409b5dcdb5d0affe364fb8fe50a90c37 (diff)
Using document importNode otherwise IE pukes
-rw-r--r--js/util.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/util.js b/js/util.js
index 10f962fd0..d1b34542e 100644
--- a/js/util.js
+++ b/js/util.js
@@ -146,6 +146,7 @@ var SN = { // StatusNet
form_id = $(this)[0].id;
$.ajax({
type: 'POST',
+ dataType: 'xml',
url: $(this)[0].action,
data: $(this).serialize() + '&ajax=1',
beforeSend: function(xhr) {
@@ -157,9 +158,9 @@ var SN = { // StatusNet
alert(errorThrown || textStatus);
},
success: function(data, textStatus) {
- if ($('form', data)[0].length > 0) {
- form_new = $('form', data)[0];
- $('#'+form_id).replaceWith(document._importNode(form_new, true));
+ form_new = document._importNode($('form', data).get(0), true);
+ if (form_new.length > 0) {
+ $('#'+form_id).replaceWith(form_new);
$('#'+form_new.id).each(function() { SN.U.FormXHR($(this)); });
}
else {