My recommendation would be to create a string parameter to hold your completed version. Whenever your numeric value changes, pass its value to your getGetOrdinal function and set your string value to what it returns.
<abs contexttype="opengear">
<meta>
<params>
<param access="1" constrainttype="INT_NULL" name="Number Entry" oid="p.entry" precision="0" type="INT16" value="0" widget="default"/>
<param access="1" maxlength="0" name="Number Display" oid="p.display" type="STRING" value="0th" widget="label"/>
</params>
</meta>
<meta>
<api>function getGetOrdinal(n)
{
var s=["th","st","nd","rd"],
v=n%100;
return n+(s[(v-20)%10]||s[v]||s[0]);
}</api>
</meta>
<param expand="true" height="55" left="23" oid="p.entry" runtasksonload="true" showlabel="false" top="20" width="146">
<task tasktype="ogscript">params.setValue('p.display', 0, getGetOrdinal(params.getValue('p.entry', 0)));</task>
</param>
<param expand="true" height="57" left="198" oid="p.display" showlabel="false" style="bdr:etched;bg#dark;txt-align:center;size:Big;font:bold;" top="19" width="150"/>
</abs>
#DashBoard