Archived
1
0

use appendChild

This commit is contained in:
Jeff Becker 2016-04-30 16:14:47 -04:00
parent 2b28431568
commit 9d7eceb927
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
2 changed files with 4 additions and 4 deletions

View File

@ -215,12 +215,12 @@ DynReply.prototype.setRoot = function(roothash) {
DynReply.prototype.showError = function(msg) {
console.log("error in dynreply: "+msg);
this._error.setAttribute("class", "error");
this._error.value = document.createTextNode(msg);
this._error.appendChild(document.createTextNode(msg));
}
DynReply.prototype.showMessage = function(msg) {
this._error.setAttribute("class", "message");
this._error.value = document.createTextNode(msg);
this._error.appendChild(document.createTextNode(msg));
var e = this._error;
setTimeout(function() {
// clear it

View File

@ -30,8 +30,8 @@ DynReply.prototype.setPrefix=function(prefix){this.prefix=prefix;}
DynReply.prototype.hide=function(){this.elem.style.display='none';}
DynReply.prototype.setBoard=function(boardname){if(boardname){this.board=boardname;}}
DynReply.prototype.setRoot=function(roothash){if(roothash){this.roothash=roothash;}}
DynReply.prototype.showError=function(msg){console.log("error in dynreply: "+msg);this._error.setAttribute("class","error");this._error.value=document.createTextNode(msg);}
DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.value=document.createTextNode(msg);var e=this._error;setTimeout(function(){e.innerHTML="";},2000);}
DynReply.prototype.showError=function(msg){console.log("error in dynreply: "+msg);this._error.setAttribute("class","error");this._error.appendChild(document.createTextNode(msg));}
DynReply.prototype.showMessage=function(msg){this._error.setAttribute("class","message");this._error.appendChild(document.createTextNode(msg));var e=this._error;setTimeout(function(){e.innerHTML="";},2000);}
function nntpchan_reply(parent,shorthash){if(parent){var boardname=parent.getAttribute("boardname");var roothash=parent.getAttribute("root");var replyto=getReplyTo();replyto.setBoard(boardname);replyto.setRoot(roothash);replyto.show();}
var elem=document.getElementById("postform_message");if(elem)
{elem.value+=">>"+shorthash.substr(0,10)+"\n";}}