How to call JavaScript function with value from ASP.NET code behind? I have JavaScript function and I am using it in a div tag
but when i call my function nothing happen ! why ?
( my parameter is path of picture and i want set this path in my div tag to view picture. )
my html code :
<div id="myPano" class="pano">
</div>
my javascript
<script>
function myFunction(imgz) {
$(document).ready(function () {
$("#myPano").pano({
img: imgz
});
});
}
</script>
and code behind ( button click )
Dim imgz As String
imgz = "img/sphere.jpg"
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "Script", "myFunction(" & imgz & ")", True)
Thank you.