ZenphotoCMS Forum
Submit with click on star - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: Submit with click on star (/thread-8665.html)



Submit with click on star - nfvv - 2011-05-28

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:

`




Submit with click on star - sbillard - 2011-05-29

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.




Submit with click on star - nfvv - 2011-05-29

Hi,

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

Grtz




Submit with click on star - acrylian - 2011-05-29

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.




Submit with click on star - sbillard - 2011-05-29

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