1 function executeConfirmedAction (action, message) {
2 // -------------------------------------------------
3 if (confirm(message)) executeAction(action);
7 function executeAction (action) {
8 // -------------------------------
10 var open = action.indexOf("(");
11 if (open > 0 && action.charAt(action.length-1) == ")") { // Function call
13 // Client side execution via the "perform" Applet
14 var method = action.substring(0, open); // Better trim the result
15 var args = action.substring(open+1, action.length-1).split(","); // Better trim each argument
16 if (method == "launch") {
17 // args[0] = executable name, args[1] = file name
18 if (args.length == 1) {
19 // alert("Executing " + args[0]);
20 document.perform.launch(args[0], null);
21 } else if (args.length >= 2) {
22 // alert("Executing " + args[0] + " with " + args[1]);
23 document.perform.launch(args[0], args[1]);
27 // Server side execution via a Struts action
28 window.location = action.replace("&", "&"); // Due to string conversion in menupopup JSP