views:

408

answers:

2

Hello

I have setup FlowPlayer and a playlist using the jquery plugin. The items on the playlist are generated in a php while loop as the file names come from a database.

I want to grab the video 'description' from the database and display it in a div, but only when the user clicks that playlist item. I have tried using the onStart event but i'm not sure how to get this working with the database.

Anyone have any experience with this? Cheers

A: 

It is probably easiest if you put the description into hidden divs during the filename loop, and then have the onStart event $(divname).show() the div corresponding to the playlist entry.

It would be easier to help you if you posted the code you have so far.

dar
A: 

Cheers for the reply. This is the loop I use to generate all the playlist items from the database:

<div class="clips low"><!-- Configure entries inside playlist--> 
            <?php $i = 1; ?>
             <?php do { ?>         
                           <a href="<?php echo $playlistFiles['filename']; ?>" class="first"> 
                           <?php echo $playlistFiles['title']; ?>                              
                           <br />
                           <em>Length <?php echo $playlistFiles['duration']; ?></em>
                  </a> 

                  <input name="" type="hidden" value="<?php echo $playlistFiles['description']; ?>" />

                 <?php $i++; ?>
     <?php  }while($playlistFiles = mysql_fetch_array($results)) ?></div>
</div>

So if I change the hidden field to a text field, below each playlist item will be a textbox with the correct description.

I'm not sure how to get this into the onStart event so that I can say change a large description DIV so the text reads the one clicked. Would you be so kind as to break it down for me? :) Thanks

whamo