Fixed Bug

Recommend this page to a friend!

      PHP Tracking User Activity  >  All threads  >  Fixed Bug  >  (Un) Subscribe thread alerts  
Subject:Fixed Bug
Summary:Fixed Bug
Messages:2
Author:Renato Filho
Date:2016-05-12 02:38:28
 

 


  1. Fixed Bug   Reply   Report abuse  
Picture of Renato Filho Renato Filho - 2016-05-12 02:38:28
When the page was loaded , the form was sent automatically. So did this:

> trackuser.jquery.js

$(document).ready(function(){

var TrackUserActivity = {
CaptureScreen : function(){
if($("#image-canvas").length>0) {
$("#image-canvas").height($('body').height());
$("#image-canvas").width($('body').width());
$('body').html2canvas({
onrendered: function (canvas) {
var formdata = {
image_code:canvas.toDataURL("image/png")
};
//console.log(formdata);
$.ajax({
url: 'ajax/trackuser.php',
type: 'POST',
data: formdata,
success: function(msg){
alert(msg);
}
})
}
});
}
}

}

$("button").click(function(e){
e.preventDefault();
TrackUserActivity.CaptureScreen();
});
});

  2. Re: Fixed Bug   Reply   Report abuse  
Picture of Bharat Parmar Bharat Parmar - 2016-05-12 05:33:51 - In reply to message 1 from Renato Filho


Thank you so much for your help to improve the code.

I will surely update for the same.

Thanks once again...

 

For more information send a message to info at phpclasses dot org.