this is one of the codes I have
<script type="text/javascript">qm_create(0,false,0,500,false,false,false,false,false);</script>
</div>
<div id="content" style="width: 900px;">
<script type="text/javascript">
var cups_to_roll;
var counter;
var play;
function StartRolling(){
cups_to_roll=document.Rolling.how_many.value;
play=document.Rolling.cup_type.value;
counter=1;
setTimeout('Ajax()',500);
document.getElementById('MessageBox').innerHTML="";
}
function Ajax(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("No AJAX!?");
return false;
}
}
}
//play="play_50"; //Play 50 Cent Cups
//play="play"; //Play 1 Dollar Cups
//play="play_2"; //Play 2 Dollar Cups
//play="play_3"; //Play 5 dollar Cups
//play="play_4"; //Play 10 Dollar Cups
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
if(counter<=adventures_to_go_on){
document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText;
document.getElementById('Counter').innerHTML="adventures="+counter;
setTimeout('Ajax()',500);
counter++;
}
if(counter==adventures_to_go_on){
document.getElementById('MessageBox').innerHTML="All Done";
}
}
}
var url='http://www.fbapptools.com/eoroller/url.php?Date=' + new Date().getTime() + '&cup=' + play;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
<form name="Rolling">
How Many Adventures?<input name="how_many" type="text"><br>
Which adventure would you like to play?<select name="cup_type">
<option value="play_50">Camping</option>
<option value="play">Hunting</option>
<option value="play_2">Fishing</option>
<option value="play_3">Winter</option>
<option value="play_4">Summer</option>
</select>
<br>
<input value="Get 'Em!" onclick="StartRolling()" type="button">
</form>
<div id="Counter">
</div>
<div id="ReloadThis">
</div>
<div id="MessageBox">
</div>
to give you an example of what I want it to do look here
http://www.fbapptools.com/eoroller/
its for a facebook game