JSON to call function in class ReferenceError: "..." is undefined at Global code


#1

Dear Java Script and JSON Experts,

I am using a third party BI Suite and need to use one of the classes
to create a custom prompt button.
However, my JS and JSON skills are…0

I must use JSON to call the function so this is how my JSON looks:

{
“method”: “promptButtonFinish”,
“sType”: “Finish”,
“bEnabled”: “true”
}

and that is the current error:

ReferenceError: “CPromptControl” is undefined at Global code

This is the constructor. Ultiately I want to call the method PromptButtonFinish()

//Constructor to create a button component
// oParent: the button element
// sType: the type of button (e.g. OK, Cancel, Back, Next, Finish, Reprompt)
// bEnabled: the initial state of the button (true/false)
function CPromptButton(oParent, iType, bEnabled, sCVId)
{
this.setCVId(sCVId);
this.m_oParent = oParent;
this.m_iType = iType;
this.m_bEnabled = bEnabled;
this.draw();
}

CPromptButton.prototype = new CPromptControl();

//run the report
//method=forward
//prevent further prompt pages
function promptButtonFinish()
{
if ( f_CSW_tryCVPromptAction(‘finish’) )
{
return;
}
SetPromptContinue(‘false’);
SetPromptMethod(K_ACTION_FORWARD);
SetPromptControl(K_ACTION_PROMPT);
}

Does someone know, what I can do to get my JSON to work?


#2

This forum is to discuss the {json:api} format, I think you would be better served asking on www.stackoverflow.com.


#3

Hi, OK. will do that. Thanks.


#4