Member
Member
nfvv   28-05-2011, 13:23
#1

Hi,

I don't like the submit button, so I want to edit it that the form will be submitted when the user clicks on a star.
Now the javascript is in a button.
I've tried several things, like:

`Adding onclick="submitStars();"

and created a function from the javascript`

`In jquery.rating.js editing:

$.fn.rating.options = { //$.extend($.fn.rating, { options: {

        cancel: 'Cancel Rating',   // advisory title for the 'cancel' link

        cancelValue: '',           // value to submit when user click the 'cancel' link

        split: 0,                  // split the star into how many parts?

        // Width of star image in case the plugin can't work it out. This can happen if

        // the jQuery.dimensions plugin is not available OR the image is hidden at installation

        starWidth: 16,

        callback: function(){

submitStars();

},

};`
But none worked. Somebody know how I can make this?
Now I have the following code:

`

Member
Member
sbillard   29-05-2011, 01:14
#2

The tool we use it jquery.rating.js. I remember a discussion on their blog about how to configure the plugin to submit on a star click. As I remember it was not straight forward. I suggest you search their discussion groups for this topic.

Member
Member
nfvv   29-05-2011, 13:54
#3

Hi,

I have tried to find the topic, but I haven't found anything.
Could somebodey help me a bit?

Grtz

Administrator
Administrator
acrylian   29-05-2011, 13:59
#4

Editing the form will not help, you will need to modify the jquery script or make your own rating plugin by using another one. Sorry, we can't help with that script as we did not write it ourselves at all, we just use it.

Member
Member
sbillard   29-05-2011, 14:14
#5

Well, I foond this first try. http://www.codingforums.com/showthread.php?t=155815

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.