SetVote javascript function is undefined for page rating

May 10, 2010 at 6:18 PM
Hi, I'm new to Sharepoint so apologies if I've done something wrong. I've followed the instructions in the manual as well as I can and searched on the discussions to see if anyone else had this problem. I have installed and activate the document rating feature for WSS 3.0 running on Server 2008. When I add the Rate Page web part to a page, it doesn't work. The number of rating stars always track the mouse, whether I click or not, so that if the mouse is hovering near the left of the stars it is rated 0 and 5 if it is near the end. If the mouse leaves the rating stars then they immediately go back to 0. If I click on a rating star or hit the send icon beside the comment field, nothing happens, except that in Firebug I can tell that there is a javascript error because the SetVote function has not been defined. The error manifests in both Firefox and IE7 Where is this supposed to be defined? Is there some javascript file not being imported correctly? It is currently impossible to save a comment or a rating. Regards, Mark
May 13, 2010 at 1:42 PM

Problem solved.

It's because my name contains an apostrophe... Mark O'Brien.

This was not being escaped in the javascript function AjaxAnswer.


      document.getElementById('RatingCommentBoxTxtArea').value+' » '+'<i>by Mark O'Brien'+'</i>|</td><td>


This messed up the whole javascript code block including the SetVote method.


Mark O\'Brien