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:
ryan 2005-12-18 15:50:53 +00:00
parent 02fb838f97
commit bb564ec1aa
1 changed files with 2 additions and 4 deletions

View File

@ -163,7 +163,7 @@ addLoadEvent(newCatAddIn);
function getResponseElement() {
var p = document.getElementById('ajaxcatresponse');
if (!p) {
p = document.createElement('p');
p = document.createElement('span');
document.getElementById('jaxcat').appendChild(p);
p.id = 'ajaxcatresponse';
}
@ -187,7 +187,6 @@ function newCatInteractive() {
function newCatCompletion() {
var p = getResponseElement();
// alert(ajaxCat.response);
var id = 0;
var ids = new Array();
var names = new Array();
@ -195,8 +194,7 @@ function newCatCompletion() {
ids = myPload( ajaxCat.response );
names = myPload( newcat.value );
for ( i = 0; i < ids.length; i++ ) {
id = ids[i];
// alert(id);
id = ids[i].replace(/[\n\r\l]+/g, "");
if ( id == '-1' ) {
p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
return;