how can i write dynamic javascript any simple example or any references.
thanking you
<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", "yes");
so.addVariable("soundPath","song.mp3");
so.addVariable("overColor","#000044")
so.addVariable("playerSkin","1")
so.write("flashPlayer");
</script>
</div>
</form>
</body>
</html>
If you would like to use ASP.NET to parse the query string rather than javascript, something like this ought to work:
However, if you do this, you will have a security hole – a custom-crafted URL could embed anything into the javascript executing on your page, including malicious code. You should use the AntiXSS library to javascript-encode the value from the query string before you insert it into your client-side javascript.