Hi, how to retrieve value from JavaScript variable by using php and ajax and store the variable value to mysql?
My code as below
[CODE]
<script type=”text/javascript”>
function zxcImgHiLight(id,nu,over){
this.p=document.getElementById(id);
this.img=this.p.getElementsByTagName(‘IMG’)[0];
var divs=this.p.getElementsByTagName(‘DIV’);
this.win=divs[0];
this.msk=divs[1]||false;
this.cnt=1;
this.ary=[];
this.over=over||false;
this.nu=nu||false;
this.addevt(this.p,’click’,’hilight’);
}
zxcImgHiLight.prototype.hilight=function(ev){
var pos=zxcPos(this.img);
var mse=[ev.clientX-pos[0],ev.clientY-pos[1]]; //coodinates
var ary=this.ary;
if (ary.length>4)
{
alert(“Click time exceed 5 times!”);
return false;
}
}
<script>
Thanks.