Code: Select all
<form name='rate' >
<?php
echo "<input type='image' src='actstar.gif' name='rate1' id='button1' value='1' title='Value rating 1' onclick='ajaxFunction(this.value, $varid)'/>";
echo "<label for='label2'></label>";
echo "<input type='image' src='actstar.gif' name='rate2' id='button2' value='2' title='Value rating 2' onclick='ajaxFunction(this.value, $varid)'/>";
echo "<label for='label3'></label>";
echo "<input type='image' src='actstar.gif' name='rate3' id='button3' value='3' title='Value rating 3' onclick='ajaxFunction(this.value, $varid)'/>";
echo "<label for='label4'></label>";
echo "<input type='image' src='actstar.gif' name='rate4' id='button4' value='4' title='Value rating 4' onclick='ajaxFunction(this.value, $varid)'/>";
echo "<label for='label5'></label>";
echo "<input type='image' src='actstar.gif' name='rate5' id='button5' value='5' title='Value rating 5' onclick='ajaxFunction(this.value, $varid)'/>";
echo "<label for='label6'></label>";
?>
</form>
Code: Select all
<script type="text/javascript" src="/home/walknsh1/public_html/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3.0/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
function ajaxFunction(a, b){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
// document.rate.time.value = ajaxRequest.responseText;
}
}
var queryString = "?val=" + a + "id=" + b;
ajaxRequest.open("GET", "actrating.php" + queryString, true);
ajaxRequest.send(null);
}
</script>
Whats the issue?? M I missing somegthing?? Plzz Help...