Highlighted
New Member.
619 views

How to get popup message by using java Script in Script Library

in Script Library I want a popup( to check some validation in Java script)  like we get through  Format control 

 

Note: option of RuleSet and Format control not avliable 

0 Likes
3 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get popup message by using java Script in Script Library

Try this one

printMsg("bla", 3);

function printMsg(sMessage, sSeverity) {
	sSeverity = (sSeverity) ? sSeverity : "1";
	if (!sMessage) {return false;}
	var scRetVal = new SCDatum();
	system.functions.rtecall("msg", scRetVal, sMessage, sSeverity);
}
0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get popup message by using java Script in Script Library

This is not a pop-up though (but will allow you to see things more directly).

You can try a system.functions.callrad() for "mb.ok".

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: How to get popup message by using java Script in Script Library

The challenge is, you can't call a message box inside the same thread as your javascript.  The RTE call has to have the 'separate thread = true', like:

function popUp(msg){
    var rc_code
    system.functions.rtecall("callrad", rc_code, "mb.ok", ["text"], [msg], true)
}

So, maybe the better question is to step back a bit... what are you trying to accomplish?  What's the goal?

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.