Secure parameters actions

(imported topic written by ageorgiev)

Hello,

I have been working on putting a few tasks/fixlets in using multiple unsecure and one secure parameters, however, I can only seem to get it to work if it’s only 1 secure and 1 unsecure. Can you please tell me what I am doing wrong?

The following code is working:

<![CDATA[
                            <P>This task will create a new standard user account on a windows machine. If the account name already exists, the password will NOT be updated.</P> 
                            <TABLE>
                            <TR>
                                    <TD><LABEL for=account>Account Name:&nbsp;</LABEL></TD>
                                    <TD><INPUT id=accname type=text name=account></TD>
                            </TR>
                            <TR>
                                    <TD><LABEL for=pass>Password:&nbsp;</LABEL></TD>
                                    <TD><INPUT id=pwd type=password name=secret></TD>
                            </TR>
                            </TABLE>
                            <script>
                            document.body.ontakeaction = function() {
                            var thePass = document.getElementById( "pwd" ).value;
                            var theAccount = document.getElementById( "accname" ).value;
                            TakeSecureFixletAction( Relevance('id of current fixlet'), Relevance('id of current bes site'), "Action1", {account: theAccount}, { password: thePass } );
                            return false;
                            }
                    </script> 
            ]]>

As soon as I add a second unsecure parameter, it doesn’t seem to work:

<![CDATA[
                            <P>This task will create a new standard user account on a windows machine. If the account name already exists, the password will NOT be updated.</P> 
                            <TABLE>
                            <TR>
                                    <TD><LABEL for=ticket>Ticket #:&nbsp;</LABEL></TD>
                                    <TD><INPUT id=ticket name=ticket></TD>
                            </TR>
                            <TR>
                                    <TD><LABEL for=account>Account Name:&nbsp;</LABEL></TD>
                                    <TD><INPUT id=accname type=text name=account></TD>
                            </TR>
                            <TR>
                                    <TD><LABEL for=pass>Password:&nbsp;</LABEL></TD>
                                    <TD><INPUT id=pwd type=password name=secret></TD>
                            </TR>
                            </TABLE>
                            <script>
                            document.body.ontakeaction = function() {
                            var thePass = document.getElementById( "pwd" ).value;
                            var theAccount = document.getElementById( "accname" ).value;
                            var theTicket = document.getElementById( "ticket" ).value;
                            TakeSecureFixletAction( Relevance('id of current fixlet'), Relevance('id of current bes site'), "Action1", {account: theAccount}, {ticket: theTicket}, { password: thePass } );
                            return false;
                            }
                    </script> 
            ]]>

My guess is that the TakeSecureFixletAction() function is not called correctly (the second unsecure parameter needs to be passed in a different way) but I am not sure what the correct syntax is. Thanks in advance.

ageorgiev

1 Like

(imported comment written by ageorgiev)

Nevermind, I found the following
article
which explained it to me.

There is a link that’s supposed to be in the above reply: https://www.ibm.com/developerworks/community/forums/html/topic?id=56dbb886-ad6f-4777-8f29-678daee29ac6