I'm putting javascript created controls (http://www.dariancabot.com/projects/jgauge_wip/) on my page.
<div class="jgauge" ></div>
$(document).ready(function () {
var ctl;
ctl = new jGauge();
ctl.init();
)}
Let's say I need to pass few parameters to init. like... ctl.init(a, b); from code behind, how can I achieve that? I tried something like this...
string script2 = String.Format("init('{0}','{1}')", param1, param2);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "initialize control", script2, true);
But it's not working. I got:
ReferenceError: init is not defined