Question
Problem with CFARGUMENT type of Numeric.
Okay, I know this is erroring because the empty string passed
to my CFARGUMENT tag isn't strictly numeric...it's empty. BUT, is
there no way to have a numeric type CFARGUMENT tag empty?
I have a form which users can make settings etc for various image editing parameters. One of these fields is a HEIGHT field where the user can choose to enter a height for the image where the function will then scale it. HOWEVER, sometimes, we don't want to enter a value at all because we might not want to scale it. For this reason, the CFC errors because the value passed is empty and thus not numeric. BUT, I am unable to supply a default="0" to stop it because otherwise the image function will squash it right down to this height.
Any ideas??
I could solve it by putting type="string"...but this, seems nasty to me.
The invoke:
<cfinvokeargument name="imageHeight" value="#form.imageHeight#" />
The receiving argument in the CFC
<cfargument name="imageHeight" type="numeric" default="" required="no" />
The error message:
The IMAGEHEIGHT argument passed to the uploadImage function is not of type numeric.
Any help would be greatly appreciated.
Many thanks,
Mikey.
I have a form which users can make settings etc for various image editing parameters. One of these fields is a HEIGHT field where the user can choose to enter a height for the image where the function will then scale it. HOWEVER, sometimes, we don't want to enter a value at all because we might not want to scale it. For this reason, the CFC errors because the value passed is empty and thus not numeric. BUT, I am unable to supply a default="0" to stop it because otherwise the image function will squash it right down to this height.
Any ideas??
I could solve it by putting type="string"...but this, seems nasty to me.
The invoke:
<cfinvokeargument name="imageHeight" value="#form.imageHeight#" />
The receiving argument in the CFC
<cfargument name="imageHeight" type="numeric" default="" required="no" />
The error message:
The IMAGEHEIGHT argument passed to the uploadImage function is not of type numeric.
Any help would be greatly appreciated.
Many thanks,
Mikey.
