Fix JS error in IE. fixes #2089
git-svn-id: http://svn.automattic.com/wordpress/trunk@3323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02fb838f97
commit
bb564ec1aa
|
@ -163,7 +163,7 @@ addLoadEvent(newCatAddIn);
|
||||||
function getResponseElement() {
|
function getResponseElement() {
|
||||||
var p = document.getElementById('ajaxcatresponse');
|
var p = document.getElementById('ajaxcatresponse');
|
||||||
if (!p) {
|
if (!p) {
|
||||||
p = document.createElement('p');
|
p = document.createElement('span');
|
||||||
document.getElementById('jaxcat').appendChild(p);
|
document.getElementById('jaxcat').appendChild(p);
|
||||||
p.id = 'ajaxcatresponse';
|
p.id = 'ajaxcatresponse';
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,6 @@ function newCatInteractive() {
|
||||||
|
|
||||||
function newCatCompletion() {
|
function newCatCompletion() {
|
||||||
var p = getResponseElement();
|
var p = getResponseElement();
|
||||||
// alert(ajaxCat.response);
|
|
||||||
var id = 0;
|
var id = 0;
|
||||||
var ids = new Array();
|
var ids = new Array();
|
||||||
var names = new Array();
|
var names = new Array();
|
||||||
|
@ -195,8 +194,7 @@ function newCatCompletion() {
|
||||||
ids = myPload( ajaxCat.response );
|
ids = myPload( ajaxCat.response );
|
||||||
names = myPload( newcat.value );
|
names = myPload( newcat.value );
|
||||||
for ( i = 0; i < ids.length; i++ ) {
|
for ( i = 0; i < ids.length; i++ ) {
|
||||||
id = ids[i];
|
id = ids[i].replace(/[\n\r\l]+/g, "");
|
||||||
// alert(id);
|
|
||||||
if ( id == '-1' ) {
|
if ( id == '-1' ) {
|
||||||
p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
|
p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue