I'm creating a system on D7 that tracks how much progress users have made watching various videos on the site. I've set up the jQuery that stores the percentage progress in an array with a modified version of the process at https://www.urbaninsight.com/2014/10/06/tracking-progress-embedded-vimeo-videos. Where I'm lost is where I actually post the data using:
$.post('/callback', {
progress: myProgressVariable
});
I realized that '/callback'
is just a placeholder, but I don't know what to sub in there. Should I designate a callback()
function in a custom module that does something with the progress data and just place the function name into the javascript -- and what might that look like? Or do I need to do something something else entirely?
/callback
and then check what post data comes in. What the php function returns doesn't matter, because your js code ignores it.