View Single Post
Old 12-11-2009, 08:24 PM   #1
woofy's Avatar
Join Date: Dec 2007
Location: San Diego
Posts: 57
Default Get Javascript into a hidden PHP field

I am trying to figure this out, you can see the sample of what I am working on here , basically it's the star rating bar, the functionality is working as far as looks but what I need it to do is insert the value of the star clicked into a hidden field I have so that when the user clicks submit, it will upload this value to my database, don't have a clue what to do here but I am assuming it would be something I need to enter in this area of the script

<li class="current-rating" style="width:50%;">Currently 2.5/5 Stars.</li>
                   <li><a href="#" title="1 star out of 5" class="one-star">1</a></li>
                      <li><a href="#"  title="2 stars out of 5" class="two-stars">2</a></li>
                      <li><a href="#"  title="3 stars out of 5" class="three-stars">3</a></li>
                      <li><a href="#"  title="4 stars out of 5" class="four-stars">4</a></li>
                      <li><a href="#"  title="5 stars out of 5" class="five-stars">5</a></li>
                    <input name="hiddenFieldID" type="hidden" id="hiddenFieldID" value="0" /></td>
                  <td width="60" rowspan="2" valign="middle"><input name="rateSUBMIT" type="submit" id="rateSUBMIT" value="SUBMIT" />
Any help would be greatly appreciated.
woofy is offline   Reply With Quote