Normally when you click on an image button inside a CFFORM, the coordinates are 
passed to the form processor. This is a simple way to support multiple buttons 
from a single form because you can use the presence of a coordinate to tell you 
which button was pressed.

I couldn't figure out why this wasn't working inside a CFWINDOW and eventually 
I stripped out all the extraneous code until I discovered that when the CFFORM 
is inside a CFWINDOW, it no longer passes the coordinates. Is that documented? 
Can anyone comment on that situation?

If anyone wants to play around with it, my test program is in 2 pieces below, 
the page that opens the CFWINDOW followed by the CFWINDOW code which dumps the 
FORM fields.

TestImageButton.cfm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<p><a 
href="javascript:ColdFusion.Window.show('EventUpdate');ColdFusion.navigate('TestImageButton2.cfm','EventUpdate');"
 >
Click here to open the window</a></p>

<cfwindow name="EventUpdate" modal="true" resizable="false" title="Test" 
    width="550" height="550" x="500" y="150"
        bodyStyle="font-size:12px; font-family: verdana; background-color: 
##dcefd2; color: black; text-align: left;" 
    headerStyle="font-size:13px; font-weight:bold; font-family:Verdana; color: 
white; text-align:left;" >
    <cfajaximport tags="cfform, cfwindow" scriptsrc="/CFIDE/scripts">
    </cfwindow> 

</body>
</html>


TestImageButton2.cfm:

<cfdump var="#FORM#">
<cfform>
    <cfinput name="Comment" size="75" required="no" />
    <INPUT TYPE="IMAGE" NAME="Save" SRC="Buttons/MSave.png">
    <INPUT TYPE="IMAGE" NAME="Delete" SRC="Buttons/MDelete.png">
    </cfform>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337861
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to