This is a migrated thread and some comments may be shown as answers.

Play selected Mp3 files in same window

1 Answer 79 Views
Window
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 28 Oct 2009, 05:12 PM
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

1 Answer, 1 is accepted

Sort by
0
Clive Hoggar
Top achievements
Rank 1
answered on 31 Oct 2009, 04:20 PM
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> 
Tags
Window
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Clive Hoggar
Top achievements
Rank 1
Share this question
or