summaryrefslogtreecommitdiffstats
path: root/wp-admin/categories.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/categories.js')
-rw-r--r--wp-admin/categories.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/wp-admin/categories.js b/wp-admin/categories.js
index a636961..8951df0 100644
--- a/wp-admin/categories.js
+++ b/wp-admin/categories.js
@@ -1,9 +1,9 @@
addLoadEvent(function() {
if (!theList.theList) return false;
document.forms.addcat.submit.onclick = function(e) {return killSubmit('theList.ajaxAdder("cat", "addcat");', e); };
- theList.addComplete = function(what, where, update) {
- var name = getNodeValue(theList.ajaxAdd.responseXML, 'name');
- var id = getNodeValue(theList.ajaxAdd.responseXML, 'id');
+ theList.addComplete = function(what, where, update, transport) {
+ var name = getNodeValue(transport.responseXML, 'name');
+ var id = transport.responseXML.getElementsByTagName(what)[0].getAttribute('id');
var options = document.forms['addcat'].category_parent.options;
options[options.length] = new Option(name, id);
};