Hi Juan,
First of all thanks to a reply. Here What I want is if I select any value of the dropdown the change event should call the route and the route will call the rating function in which I defined to hit the web service to update the rating in the database.
I have done to display the rating of the particular post. and yes you point out the actual problem. Below I am sharing the code.
<%
function ratecall(){
<!-- document.getElementById("rate").onchange = function () {-->
alert("ON CHANGE FIRED");
<!--};-->
}%>
<% if (post.canrate) { %>
<select id="rate" onchange="ratecall()">
<% for(var i=0;i<post.scales-1;i++){
if(i==post.rated){
var a= 'selected';
}else{
a='';
}
%>
<option id="<%=i%>"<%=a %> > <%= i%></option>
<%}%>
</select>
<%}else{
}
%>
here now I am only calling an alert on change event. But it is not working. I planned to create new link in ratecall function which will call the route which call the web service to update the in database.