Recently, I created a JavaScript function that looks like this:
function ShowMsg(msg) {
$.blockUI({
message: '<div dir=rtl align=center><h1><p>' + msg + '</p></h1></div>',
css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
}
});
setTimeout($.unblockUI, 2000);
}
Now, I am trying to call this function on the server side in ASP.NET:
Page.ClientScript.RegisterClientScriptBlock([GetType](), "script", "ShowMsg(" & "Saved" & ");", True)
Unfortunately, it's not working when I pass an argument to the function. It seems to work fine without any arguments. Could there be a syntax error that I'm missing? Any help would be greatly appreciated. Thank you.