Can someone show me a way to create a client-side variable in one module for another module on the same page to use? I have tried playing with the ClientAPI (shown below), but so far it hasn't worked for me. The variable would be a simple string value.
Here is what I tried during testing (following the example in the documentation):
IN CODE-BEHIND:
' In the page_load event
DotNetNuke.UI.Utilities.ClientAPI.RegisterClientVariable(Me.Page, "TestVar", "Sucess!!", True)
IN MARK-UP:
// at the bottom of the module mark-up
var oVar = dnn.getVar('TestVar');
[EDIT]
After that, I decided to try the other example of setting and retrieving the value on client-side, and when that line of JavaScript attempts to execute, the browser crashes. Here is what I put in the mark-up just below the other JavaScript snippet from above:
dnn.setVar('newTest','SUCCESS!!!');
var oVar2 = dnngetVar('newTest');
[/EDIT]