XModPro

CommandLink and detection if clicked

Buck Anderson Buck Anderson posted Jul 2, 2015
Active Jul 23 · Viewed 2403 times

We are creating a training template that allows the user to click links on a page and when they first click a link it counts as 10% of a 100% completion of the training.

To create these links, we have several CommandLinks on the template that updates the db field (percentage_complete) and then links to a site in a new window.


Once the link is clicked, it updates the total :

<xmod:CommandLink Text="TEST - This Link" style="font-size:15px;" onClientClick="window.open('somesite.com','_blank');">
<Command Target="Level1Checklist" Name="SomeName" Type="Custom">
<Parameter Name="UserID" Value='[[User:ID]]' DataType="Int32" />
<Parameter Name="Percentage_Complete" Value='10' DataType="Int32" />
<parameter name="Total_Percentage_Completed" direction="Output" datatype="int32" size="100" />
</Command>
</xmod:CommandLink>

Question: How can I trap that the db is updated only on the first click of the CommandLink?

After the first click on the link we want the user to continue to have the link visible and clickable but not count it as an additional 10% course completion.

TIA
Buck

1 Reply

Loading replies...