Hi Marc,

You don't have to know the actual coordinates, except for special
occasions (client-side image maps).

So, add a name to the graphic input on the form:
<input type="image" name="deleteYes" ...>

You're just checking to see whether those *variables* are present, not
what their values are. So, you'll end up with two form variables:

form.deleteYes.x
form.deleteYes.y

where

form.deleteYes.x=10 // or some other integer (not important)
form.deleteYes.y=8 // or some other integer (not important)

Just check for variable presence, though, since it won't exist without
a click:

<cfscript>
<cfif isdefined('form.deleteYes.x')>
 <!--- your delete code goes here --->
</cfif>
</cfscript>

That should work "out of the box."

Let me know if you have questions.

Jamie

>>From: Marc Garrett [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, June 20, 2002 4:08 PM
>>To: Jamie Jackson
>>Subject: Re: how to catch image input buttons with isDefined()?
>>
>>
>>Jamie,
>>
>>Thanks so much for your assistance. In your code sample, I don't understand
>>how I obtain the click coordinates to know what x and y should be?
>>
>>Regards,
>>
>>Marc Garrett

>>>----- Original Message -----
>>>From: "Jamie Jackson" <[EMAIL PROTECTED]>
>>>To: "Marc Garrett" <[EMAIL PROTECTED]>
>>>Sent: Thursday, June 20, 2002 3:55 PM
>>>Subject: Re: how to catch image input buttons with isDefined()?
>>>
>>>
>>>Name the image:
>>>
>>><input type="image" name="myName" ...>
>>>
>>>Action Page:
>>>
>>>// since click coordinates are passed, you can use x or y
>>>if (isdefined('form.myName.x')) {
>>> // action
>>>}
>>>
>>>or
>>>
>>>if (isdefined('form.myName.y')) {
>>> // action
>>>}
>>>
>>>Jamie

On Thu, 20 Jun 2002 09:14:17 -0400, in cf-talk you wrote:

>>>>I've had a designer change a form's buttons from type="submit" to
>>>>type="image." There are two buttons. I need to perform an action based on
>>>>the particular button clicked. I had the following code for submit buttons,
>>>>but it doesn't work now that they're image buttons. What am I missing?
>>>>
>>>><cfif isDefined("form.deleteYes")>
>>>>    [the action to perform]
>>>></cfif>
>>>>
>>>>Thanks for any assistance.
>>>>
>>>>Marc Garrett


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################

#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to