How to get a value from JavaScript
How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
ScriptData::ScriptDataType fDataType = resultData.GetType();
if (fDataType == kTrue)
{
CAlert::InformationAlert("sucess");
//call some function
}
else
{
CAlert::InformationAlert("Error");
// do nothing
}
JavaScript Code:
if(app.scriptArgs.isDefined("paramkeyname1"))
{
var value = app.scriptArgs.get("paramkeyname1");
alert(value);
return true;
}
else
{
alert ("SORRY");
return false;
}