Here is that code. I’ll see what I can do. thanks
<Description><![CDATA[
<TABLE><TBODY><TR><TD> <?hxlat Some Server Plugin applications running on the IEM Server require Master Operator credentials to access the REST API of the Server. Provide Master Operator credentials in the following form and then click Take Action to store them on Server.?> <form style="width:500px" onsubmit="_takeAction()"> <fieldset> <legend><strong><?hxlat REST API Configuration?></strong></legend> <div style="padding: 10px; padding-bottom: 20px"> <table> <tr> <td width="200" align="right" style="padding-right:5px"> <label for="RESTUsername"><?hxlat Master Operator User name:?></label> </td> <td align="left"> <input type="text" id="RESTUsername" name="RESTUsername" style="width:250px" /> </td> </tr> <tr> <td align="right"> <label for="RESTPassword" style="padding-right:5px"><?hxlat Master Operator Password:?></label> </td> <td align="left"> <input type="password" id="RESTPassword" name="RESTPassword" style="width:250px" /> </td> </tr> <tr> <td align="right"> <label for="RESTPassword2" style="padding-right:5px"><?hxlat Confirm Password:?></label> </td> <td align="left"> <input type="password" id="RESTPassword2" name="RESTPassword2" style="width:250px" /> </td> </tr> <tr> <td align="right"> <label for="RESTURL" style="padding-right:5px"><?hxlat REST API URL:?></label> </td> <td align="left"> <input type="text" id="RESTURL" name="RESTURL" style="width:250px" value="<?relevance concatenation "https://" of (substrings separated by "http://" of url of current bes server) ?>/api"/> </td> </tr> </table> </div> </fieldset> </form> <script> function _takeAction(){ var RESTUsername = document.getElementById("RESTUsername").value; var RESTPassword = document.getElementById("RESTPassword").value; var RESTPassword2 = document.getElementById("RESTPassword2").value; var RESTURL = document.getElementById("RESTURL").value; if(!RESTUsername){ alert("<?jxlat Fill in the Master Operator User name before taking action.?>"); return; } if(!RESTPassword){ alert("<?jxlat Fill in the Master Operator Password before taking action.?>"); return; } if(RESTPassword != RESTPassword2){ alert("<?jxlat Error: Passwords do not match.?>"); return; } if(!RESTURL){ alert("<?jxlat Fill in the REST API URL before taking action.?>"); return; } TakeSecureFixletAction(Relevance('id of current fixlet'), Relevance('id of current bes site'), "Action1", {}, { RESTUsername: RESTUsername, RESTPassword: RESTPassword, RESTURL: RESTURL }); } document.body.ontakeaction = function() { _takeAction(); return false; } </script></TD></TR></TBODY></TABLE>
]]></Description>
Also, when viewing the code by clicking on the Edit Script Element button when editing the task, here is that code:
function _takeAction(){ var RESTUsername = document.getElementById("RESTUsername").value; var RESTPassword = document.getElementById("RESTPassword").value; var RESTPassword2 = document.getElementById("RESTPassword2").value; var RESTURL = document.getElementById("RESTURL").value; if(!RESTUsername){ alert("<?jxlat Fill in the Master Operator User name before taking action.?>"); return; } if(!RESTPassword){ alert("<?jxlat Fill in the Master Operator Password before taking action.?>"); return; } if(RESTPassword != RESTPassword2){ alert("<?jxlat Error: Passwords do not match.?>"); return; } if(!RESTURL){ alert("<?jxlat Fill in the REST API URL before taking action.?>"); return; } TakeSecureFixletAction(Relevance('id of current fixlet'), Relevance('id of current bes site'), "Action1", {}, { RESTUsername: RESTUsername, RESTPassword: RESTPassword, RESTURL: RESTURL }); } document.body.ontakeaction = function() { _takeAction(); return false; }
Both seem pretty difficult to re-engineer for beginners.