-
1. Re: Some assistance with Spry Rating Widget
mytaxsite.co.uk Sep 12, 2012 7:19 PM (in response to WolfShade)Not sure whether you are aware that Adobe has stopped developing Spry and only the volunteers and enthusiasts will keep it going. I would strongly, recommend that you should start using something else. To read the Adobe Blog, click at this link:
<http://blogs.adobe.com/dreamweaver/2012/08/update-on-adobe-spry-framework-availability.htm l>
Good luck.
-
2. Re: Some assistance with Spry Rating Widget
WolfShade Sep 12, 2012 7:53 PM (in response to mytaxsite.co.uk)Thank you, but I am aware that Adobe has stopped supporting Spry. I've already read the announcement. But I still see the occasional Spry-related questions around here, so assumed that a Spry developer might have an answer to my query.
And I'm just starting to learn it, just because. It's something different. I'll probably never use any of it in any paid projects, but it's still nice to get a feel for it.
^_^
-
3. Re: Some assistance with Spry Rating Widget
mytaxsite.co.uk Sep 12, 2012 8:35 PM (in response to WolfShade)1 person found this helpfulSure, SPRY is still supported but the experts are normally in this forum:
<http://forums.adobe.com/community/labs/spry>
Unfortunately, it is not very active. and so you will get some replies here; it is a question of waiting until Gramps is around
Good luck.
-
4. Re: Some assistance with Spry Rating Widget
WolfShade Sep 13, 2012 5:34 AM (in response to mytaxsite.co.uk)Thank you, mytaxsite.co.uk. I'll repost in there and wait.
^_^
UPDATE: Well, I would have posted, there, but it is now READ ONLY.
-
5. Re: Some assistance with Spry Rating Widget
David_Powers Sep 13, 2012 6:50 AM (in response to WolfShade)WolfShade wrote:
And I'm just starting to learn it, just because. It's something different. I'll probably never use any of it in any paid projects, but it's still nice to get a feel for it.
I have never used the rating widget, but I do have the Spry example files from when they were originally released. I assume that you have managed to download the same files from GitHub.
Open widgets.html in the widgets folder. Scroll down to the bottom, and click the Ratings > Overview link. Close to the bottom is a section titled "Update the Ratings Value Dynamically". The example code looks like this:
<body> <span id="spryrating1" class="ratingContainer"> <span class="ratingButton"></span> <span class="ratingButton"></span> <span class="ratingButton"></span> <span class="ratingButton"></span> <span class="ratingButton"></span> <input type="text" id="ratingValue" name="dynamic_rate" value="2"/> </span> <script type="text/javascript"> var rate = new Spry.Widget.Rating("spryrating1", {ratingValueElement:"ratingValue", afterRating:'serverValue', saveURL:'SpryRating.php?id=spryrating5&val=@@rw_Rating@@'}); </script> </body>
Notice that the options object contains this: afterRating: 'serverValue'. Unfortunately, the sample files (at least the ones I've got) don't include a copy of SpryRating.php. However, I assume that it probably saves the selected value, calculates the average of all saved values, and then uses echo to output "serverValue=4.5" (or whatever the average is).