From 359853c2cad8619bf110c9aa094fdc26600f26ef Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Sun, 1 Jul 2007 13:38:29 +0000 Subject: [PATCH] making better use of DOM --- skins/common/wikibits.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 7cbe0038c8..a496e24125 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -793,8 +793,12 @@ function checkFileExists () { // Set warning var thetd = destFile.parentNode ; -// thetd.innerHTML += url ; - thetd.innerHTML += " A file with this name already exists; uploading under the same name will replace it!" ; + var nn = document.createElement("span") ; + nn.id = "existsWarning" ; + nn.style.color = "red" ; + var nt = document.createTextNode(" A file with this name already exists; uploading under the same name will replace it!"); + nn.appendChild ( nt ) ; + thetd.appendChild ( nn ) ; // Restore the filename var destFile = document.getElementById('wpDestFile'); -- 2.20.1