I am attempting to pass a variable to clients side script,edit the value, and return it to server side. To start with, for testing, I did the following in the server side:
If ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.DHTML) Then
ClientAPI.RegisterClientVariable(Page, "Of", "Frank", True)
DNNClientAPI.AddBodyOnloadEventHandler(MyBase.Page, "GetURL()")
End If
So this calls function GetURL() on the client side in the page load event. In GetURL I have:
function GetURL()
{
var sOF = dnn.getVar('Of');
}
this line alone causes a 'Object doesn't support this Property or Method" javascript error
What am I doing wrong? For testing I put GetURL() in the dnncore.js file and I am calling it from admin/security/signin.ascx.
PLEASE help me.