MeTa
07-01-2011, 05:59 PM
Hello all
I have a big problem
I have my php like this
<?
$codid=$_GET["cid"];
echo "
<script>
setTimeout(function() {CSelect();}, 100) ;
</script>
<div id=\"ReloadThis\"></div>";
?>
And my js funtion
function CSelect()
{
var
$http,
$self = arguments.callee;
if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
}
}
if ($http) {
$http.onreadystatechange = function()
{
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http.responseText;
setTimeout(function(){$self();}, 10);
}
};
$http.open('GET', 'linii_c/select.php'+'?cod='+'PHP VARIABLE', true);
$http.send(null);
}
}
who i can put my php variable into the funtion?
Thanx in advence and sorry for my bad english!
I have a big problem
I have my php like this
<?
$codid=$_GET["cid"];
echo "
<script>
setTimeout(function() {CSelect();}, 100) ;
</script>
<div id=\"ReloadThis\"></div>";
?>
And my js funtion
function CSelect()
{
var
$http,
$self = arguments.callee;
if (window.XMLHttpRequest) {
$http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
$http = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
$http = new ActiveXObject('Microsoft.XMLHTTP');
}
}
if ($http) {
$http.onreadystatechange = function()
{
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http.responseText;
setTimeout(function(){$self();}, 10);
}
};
$http.open('GET', 'linii_c/select.php'+'?cod='+'PHP VARIABLE', true);
$http.send(null);
}
}
who i can put my php variable into the funtion?
Thanx in advence and sorry for my bad english!