.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

dynamic javascript in .net?

Posted By: surya sasidhar     Posted Date: April 12, 2010    Points:2   Category :ASP.Net
hi,

in my application (asp.net) i am using a audio player called (premiumbeat.com) Royalty free music player ya it is working fine in my appliction. I am giving the audio file directly in that code (the code which is given by the royalty free music when we download the tool) but my audio file come dynamically that is the audio file comes from the query string (from the another page) then how can i place the audio file in that code this is the code....


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashPlayer">
</div>
<script type="text/javascript">
var so = new SWFObject("playerSingle.swf", "mymovie", "192", "67", "7", "#FFFFFF");
so.addVariable("autoPlay", "no");
so.addVariable("soundPath","song.mp3");
so.addVariable("overColor","#000044")
so.addVariable("playerSkin","1")
so.write("flashPlayer");
</script>
</div>

</form>
</body>
</html>

Responses
Author: Venkat             
Posted Date: April 12, 2010     Points: 5   

HI,

Have a global variable and assign the value of it dynamically (you can use hidden variable for that) hidden variable contain the file name assign in the server side .

for ex

var fileName= <%= HiddenServerVariable%>;

var so = new SWFObject(fileName, "mymovie", "192", "67", "7", "#FFFFFF");

This may help you.

Mark As Answer if this solve your problem
Warm Regards,
Venkat


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend