if C1 is an image button then when it is clicked form.C1.X and form.C1.Y
will exist and have as values the x and y coords within the image where
the mouse was clicked.  form.C1 however will not exist. Note that C1.X
and C1.Y are two simple variables that contain dots in their name not a
struct with 2 keys.

BTY you should use StructKeyExists(form, "C1.X") instead of isDefined.

Robert Orlini wrote:

> I have an image as a form button as:
> <input type="image" src="" name="C1" value="update">
>
> In my CF code pressing this button should execute an update, however
> the following code generates an error:
>
> <CFIF IsDefined("form.C1.X") and form.C1 EQ "update">
>
> Cold Fusion Server logged the following error information:
> An error occurred while evaluating the _expression_:
> IsDefined("form.C1.X") and form.C1 EQ "update"
> Error near line 1, column 29.
> Error resolving parameter FORM.C1
> The specified form field cannot be found.
>
> Am I missing something here?
>
> Thanks.
>
> Robert O.
> HWW
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to