[pLog-svn] r6314 - plugins/branches/lifetype-1.2/crystalpoll/js

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Sat Apr 19 14:11:00 EDT 2008


Author: jondaley
Date: 2008-04-19 14:11:00 -0400 (Sat, 19 Apr 2008)
New Revision: 6314

Modified:
   plugins/branches/lifetype-1.2/crystalpoll/js/crystalPollAjax.js
Log:
Ahmad's fix for IE

Modified: plugins/branches/lifetype-1.2/crystalpoll/js/crystalPollAjax.js
===================================================================
--- plugins/branches/lifetype-1.2/crystalpoll/js/crystalPollAjax.js	2008-04-16 07:56:02 UTC (rev 6313)
+++ plugins/branches/lifetype-1.2/crystalpoll/js/crystalPollAjax.js	2008-04-19 18:11:00 UTC (rev 6314)
@@ -33,13 +33,13 @@
 		xmlHttp = getXmlHttpObject();
 		xmlHttp.onreadystatechange = function() {
 			if(xmlHttp.readyState==4) {
-				div = document.getElementById("crystalPoll");
-				div.innerHTML = readPollAjax();
+				readPollAjax();
 			}
 		}
 		button = document.getElementById("vote");
 		button.style.display = 'none';
-		xmlHttp.open("GET", pollBaseUrl+"/index.php?op=addVote&choice="+selectedChoice+"&pollId="+pollId, true);
+		rnd = Math.random ( ) * 1000000;
+		xmlHttp.open("GET", pollBaseUrl+"/index.php?op=addVote&choice="+selectedChoice+"&pollId="+pollId+"&r="+rnd, true);
 		xmlHttp.send(null);
 	}
 }
@@ -53,6 +53,7 @@
 			div.innerHTML = xmlHttp.responseText;
 		}
 	}
-	xmlHttp.open("GET", pollBaseUrl+"/index.php?op=readPoll", true);
+	rnd = Math.random ( ) * 1000000;
+	xmlHttp.open("GET", pollBaseUrl+"/index.php?op=readPoll&rr="+rnd, true);
 	xmlHttp.send(null);
 }



More information about the pLog-svn mailing list