Curious. I also see a lot of smart quotes in your code. Could you confirm that all the above single quotes are ' and not ’ (there’s a subtle but important difference in coding). It might just be the forum parser changing them, but we should be sure these aren’t in your code editor before debugging further. Also, is there a place to see your code live? That would help with debugging too.
I typed that part it’s not in my text editor…and for live code I would have to deploy the whole project. I have been stuck on this for days.
If it helps:
1.I have put console.log(rate) everywhere, the console doesn’t show me anything.(does it contain an empty string?)
2.The ajax function technically works bcoz it shows a 200 post msg in web console.
3.the url ajax sends the data to shows empty strings when printed.
So overall I think the problem must be in the jQuery/ajax itself. I just can’t find it.
Okay… I have no idea if this helps… but here’s something. I wasn’t able to get the rate into your current rating function. I was able to get the rate all the way into your ratings function with the following code buy rewriting how the submit event is attached to the form.
ok this is late but I just solved this!
ps : this was not showing up on the console before bcoz of some django jargan(form submission and all that).