Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/bd1c54f48d5bb81723baced887a0f872 to your computer and use it in GitHub Desktop.
Save trycf/bd1c54f48d5bb81723baced887a0f872 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
dump(server.lucee.version);
Quantity=777;
</cfscript>
<cffunction name="trimDecimal">
<cfargument name="value">
<cfif Find('.',value)>
<cfreturn REReplace(REReplace(value, "0+$", "", "ALL"), "\.+$", "")>
<cfelse>
<cfreturn value>
</cfif>
</cffunction>
Display Code
<table>
<tr>
<td align="center">
<cfoutput>
<input name="Qty001" type="text" class="pix13" value="#trimDecimal(Quantity)#" size="8"maxlength=“8” onfocus=“specialfocusBG(this)” onblur=“specialblurBG(this)” onChange="GoodsOutForm.submit();" ></td>
</cfoutput>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment