Forum Moderators: open
Its like this:
function (radioChoice){
//Store result in database/file
openFile("results.txt");
readFile("read in yes results and no results);
so now
var radioYes = "# from your file";
var radioNo = "# from your file";
if(radioChoice=="yes")
radioYes+=1;
else
radioNo+=1;
writeFile("write back yes and no with new variables");
/*Show results in cute image!
these divs will be a certain width, and a certain background color( green for yes, red for no), and their div.style.width will be a proportion between the yes and no answers.*/
ex.:
radioYes = 15, radioNo = 5; maxWidthofDiv = 30% of screen;
divYes.style.width = radioYes/(radioYes + radioNo) *maxWidthOfDiv;
divNo.style.width = radioNo/(radioYes + radioNo) * maxWidthOfDiv;
divYes.style.visible="visible";
divNo.style.visible="visible";
and u've done it!
LOOOL :)
[ralusp.net...]