[SUCS Devel] [Git][sucssite/sucs-site][master] Remove old JS file

Laurence Sebastian Bowes elbows at sucs.org
Mon Nov 9 14:49:02 GMT 2015


Laurence Sebastian Bowes pushed to branch master at sucssite / sucs-site


Commits:
bd6650ab by Laurence Sebastian Bowes at 2015-11-09T14:48:54Z
Remove old JS file

- - - - -


1 changed file:

- − htdocs/js/xmlhttp.js


Changes:

=====================================
htdocs/js/xmlhttp.js deleted
=====================================
--- a/htdocs/js/xmlhttp.js
+++ /dev/null
@@ -1,47 +0,0 @@
-function postcomment(strBaseUrl, strBlog, strPost) {
-	var xmlhttp = false;
-
-	if (window.XMLHttpRequest) {
-		xmlhttp = new XMLHttpRequest();
-		xmlhttp.overrideMimeType('text/xml');
-	} else if (window.ActiveXObject) {
-		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-	} else {
-		return true;
-	}
-
-	document.getElementById("spinner").style.visibility = "visible";
-	document.getElementById("errors").innerHTML = "";
-	frm = document.forms['commentform'];
-	url = "blog=" + strBlog + "&post=" + strPost + "&author=" + escape(frm.elements['author'].value) + "&email=" + escape(frm.elements['email'].value) + "&comment=" + escape(frm.elements['comment'].value);
-
-	xmlhttp.open("POST", strBaseUrl+"comment", true);
-	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
-	xmlhttp.onreadystatechange = function() {
-		if (xmlhttp.readyState == 4) {
-			//alert(xmlhttp.responseText);
-			//alert(xmlhttp.getAllResponseHeaders());
-			document.getElementById("spinner").style.visibility = "hidden";
-			frm.elements['author'].style.backgroundColor = "#FFF";
-			frm.elements['email'].style.backgroundColor = "#FFF";
-			frm.elements['comment'].style.backgroundColor = "#FFF";
-			responseArray = xmlhttp.responseText.split("<split>");
-			if(responseArray[1] == "OK"){
-				document.getElementById("comments").innerHTML += responseArray[0];
-				document.getElementById("errors").innerHTML = "";
-				//frm.elements['author'].value = ""
-				//frm.elements['email'].value = "";
-				frm.elements['comment'].value = "";
-			} else {
-				if(responseArray[2]!="") {
-					frm.elements[responseArray[2]].style.backgroundColor = "#FFD1CD";
-					document.getElementById("errors").innerHTML = responseArray[0];
-				} else {
-					document.getElementById("comments").innerHTML += responseArray[0];
-				}
-			}
-		}
-	}
-	xmlhttp.send(url)
-	return false;
-}



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/bd6650ab5b707105d82ea35d1b67afa12257def3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20151109/96fb7d09/attachment.html>


More information about the Devel mailing list