Dark Light

function doTickybox(tickybox){

var xmlHttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlHttp = new ActiveXObject(“Msxml2.XMLHTTP”);
} catch (e) {
try {
xmlHttp = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch (E) {
xmlHttp = false;
}
}
@end @*/
if (!xmlHttp && typeof XMLHttpRequest!=’undefined’) {
try {
xmlHttp = new XMLHttpRequest();
} catch (e) {
xmlHttp=false;
}
}

if (!xmlHttp)
{
alert(“No XML for you!”);
return;
}
//alert(tickybox.checked);

//var xmlHttp = new XMLHttpRequest();
// specify HTTP method, file URL and
// whether to use asynchronous loadingobj
xmlHttp.open(“GET”, “http://cenote.gkhs.net/~aquarion/tickybox/tickybox.php?value=”+tickybox.checked, true);
//xmlHttp.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);

xmlHttp.onreadystatechange=function() {
if (xmlHttp.readyState==4) {
if (xmlHttp.responseText != “” && xmlHttp.responseText != null){
document.getElementById(“tickyboxLabel”).innerHTML = xmlHttp.responseText+” people have checked the tickybox”;
}
} else {
//alert(“hi”+ xmlHttp.readyState);
}
}
// perform the actual request
xmlHttp.send(null);
// show result
//alert(Sarissa.serialize(xmlHttp.responseXML));
}

(This may not work in aggregators, or possibly at all)

Related Posts

Toast and hacks

“Toast” “Hmm?” “Toast.” “As in, unraw bread?” “If you like.” “Okay. Why are you talking about toast?” “Because…