i'm working on a little slider which provides a value that i want to use in php.. Now i've got the slider working it's storing its value in (var singleValues) but now i don't know how to send it correctly to php.
the slider:
function displayVals() {
$( "#slider" ).slider();
var step = $( "#slider" ).slider( "option", "step" );
$( "#slider" ).slider( "option", "step", 20 );
var singleValues = $('#slider').slider('value');
$("p.value1").html(singleValues);
$( "#slider" ).slider({
change: function(event, ui) {displayVals();}
});
};
I have used xmlhttp before like down here V, but i don't know how to alter it to send (var singleValues) to a file.php
function achterpaneel(str)
{
if (str=="")
{
document.getElementById("rightColumn_content").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("rightColumn_content").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","getAchterpaneel.php?r="+str,true);
xmlhttp.send();
}
Probably it's quite simple but I can't figure it out. stil have to learn a lot:)
Thanx!!