Play selected Mp3 files in same window

2 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 28 Oct 2009 Link to this post

    Hi

    I have a page that lists Mp3 files.

    When one of them is clicked, I want to open a RadWindow.
    The window content will be an Mp3 player and controls, and will receive an ID
    that will be used to look up the filename, title, description etc.

    Can you give me some ideas on how to approach this. I have used the RadWindow a lot
    but this involves opening the same window from multiple elements, and passing a
    parameter to the window content page.

    Thanks a lot for pointers on the best way to do this!

    Clive
  2. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 31 Oct 2009 Link to this post

    Hi

    I figured it out, using javascript to open the window and passing the url with a parameter in it,
    using that parameter to look up the info from the database in the content window.
    I hope this helps someone else.

    Clive

    <script type="text/javascript" language="javascript">    
            function showWindow(url) {  
                var oWnd = $find("<%=RadWindow1.ClientID%>");  
                oWnd.setUrl(url);  
                oWnd.show();     
            }    
    </script> 
       
    <telerik:RadWindow ID="RadWindow1" runat="server" Skin="Black" Width="350px"   
    Height="80px" Behaviors="Move,Close,Resize" VisibleStatusbar="False" Animation="Fade">
    </telerik:RadWindow>
       
     
    <ul> 
    <li><a href="javascript:onclientclick=showWindow('../windows/play-podcast.aspx?ID=123');">Podcast1</a></li>  
    <li><a href="javascript:onclientclick=showWindow('../windows/play-podcast.aspx?ID=456');">Podcast2</a></li>  
    etc etc  
    </ul> 
Back to Top