I once reused a function that I found in the KM ScriptLibrary to display a message box using a callrad to mb.ok.
It didn't use further because it had one disadvantage for me namely that the JavaScript does not wait until you press the OK button but it continues to execute everything that is coming after this function.
Code:
/*****************************************************************************************************
* This function will show a popup messagebox.
* Author: fid509
* Date: 20/11/2008
* @input {sString} sString: the string to be displayed
* @output none
*
/****************************************************************************************************/
function domessageBox(message)
{
var rteReturnValue = new SCDatum();
var argNames = new SCDatum();
var argVals = new SCDatum();
argVals.setType(8); //type Array
argNames.setType(8); //type Array
var argVal;
argVal = new SCDatum();
argVal.setType(2); //Type string
argVal.push("text");
argNames.push(argVal);
argVal = new SCDatum();
argVal.setType(2) //Type string
argVal.push(message);
argVals.push(argVal);
//print("argVals="+argVals);
system.functions.rtecall("callrad",rteReturnValue,"mb.ok",argNames,argVals,true);
//false to run in same thread, true to run in new thread
} //end function
Bookmarks