| Get in PHP rating value from a dynamic bar User drag bar and i need value in PHP |
rowtc2

msg:4342924 | 10:12 pm on Jul 22, 2011 (gmt 0) | For each article I have a rating script and user drag the bar to select a value from 1 to 10. The current value selected by user is displayed in browser eg. 5 stars. I do not know how to get that value in the input form, to upload it in mysql database. The value is named value in code
+ value + ' stars' Here is the code:
<head> .. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script src="http://www.mysite.com/js/rating.js"></script> </head> ..
<div id="rating-22"></div> <div id="result-22"></div> <div id="currentval-22"></div>
<script type="text/javascript"> $('#rating-22').slidy({ maxval: 10, interval: 1, defaultValue: 4, finishedCallback: function (value) { $('#result-22').html ('You selected: ' + value) ; }, moveCallback: function (value) { $('#currentval-22').html('<strong>' + value + ' stars' + '</strong>') } }); </script>
<form method="post" action="http://www.mysite.com/<?php echo $article_id;?>.html">
<input type="hidden" name="slidy_rating_value" value="HERE_I_NEED_RATING_VALUE">
</form>
..
Any help is appreciated. Thanks
|
daveVk

msg:4342941 | 12:15 am on Jul 23, 2011 (gmt 0) | add line $('#currentval-22').html('<strong>' + value + ' stars' + '</strong>'); $('#idSlidy').val(value); and add id to input element <input id=idSlidy type="hidden" name="slidy_rating_value" value="HERE_I_NEED_RATING_VALUE">
|
rowtc2

msg:4343041 | 12:36 pm on Jul 23, 2011 (gmt 0) | Is working, thanks! It does not refreshing in source code, but when i get data from input with POST the correct value is there.
|
|
|