Jquery Jpoll Plugin not working
I am refering http://www.danwellman.co.uk/category/plugin/ for Jpoll stub
But getting Java script error as "Expected :"
Following are my code details
<TABLE CELLPADDING="1" CELLSPACING="1" BORDER="0" WIDTH="98%" height="100%" CLASS="GridOne">
<TR><TD class="boldText">Todays Poll</TD></TR>
<TR><TD><div id="pollContainer"></div></TD></TR>
</TABLE>
<SCRIPT type=text/javascript>
$(documen开发者_如何学Pythont).ready(function(){
var config = {
ajaxOpts.url: "miscellaneous.do?requestSource=PROCESS_POLL",
groupName:"a string",
groupIDs:["One", "Two" , "Three"],
pollHeading:"",
rowClass:"",
errors:true || false
};
$("#pollContainer").jPoll(config);
});
</script>
But if i remove this line eror is not occur.
ajaxOpts.url: "miscellaneous.do?requestSource=PROCESS_POLL",
Please help.
The website that you have mentioned says that this plugin is only a front-end for the poll and one must implement the backend oneself:
When the form is submitted,the results are passed to a backend file which processes the response (I used PHP and MySQL, although other languages and database servers are available). The widget is just the frontend of the application, you must supply the backend.
So the ajaxOpts.url
is the parameter that you pass into the plugin to specify your poll processing engine, so a random url like "miscellaneous.do?requestSource=PROCESS_POLL"
could be what is causing the error.
If it is indeed the right url, you should provide the code behind that url's page/service to get more help on that. Hope that helps...
精彩评论