When my javascript method is called I should have access to NodeID and NodeType, but that does not seem to be the case. My method code is:
function editReport()
{
alert("testing");
try
{
alert(NodeID);
}
catch (e)
{
alert("Error: " + e);
}
}
Which is successfully called. I get an alert saying "testing" as expected, but then instead of an alert with the Node's id I get an alert saying: "Error: NodeID is not defined"
How can I access the Node ID so that I can tell what item to operate on?
How to get NodeID from custom IAction javascript method
I am trying to get a custom context menu item working. According to this page: http://our.umbraco.org/wiki/reference/backoffice-apis/tree-api-to-create-custom-treesapplications
When my javascript method is called I should have access to NodeID and NodeType, but that does not seem to be the case. My method code is:
function editReport()
{
alert("testing");
try
{
alert(NodeID);
}
catch (e)
{
alert("Error: " + e);
}
}
Which is successfully called. I get an alert saying "testing" as expected, but then instead of an alert with the Node's id I get an alert saying: "Error: NodeID is not defined"
How can I access the Node ID so that I can tell what item to operate on?
Call from js..
var nodeId = UmbClientMgr.mainTree().getActionNode().nodeId;
is working on a reply...