Re: [Zope] Multiple SUBMIT images on one form

2006-02-06 Thread Tino Wildenhain

Richard Smith schrieb:
I gather that the problem whereby having more than one IMG submit on a 
single form causes some browsers (IE but not firefox) problems is well 
known.  The problem is solved by using the positional attributes x,y in 
a cgi script.


Pardon, but how do the x,y coordinates help you to identify the image?

However, using Zope I cannot see how to access these atributes anmd 
certainly request.form does not appear to give me enough information to 
assertain which button has been submitted.  I'll confess to still using 
2.7.2 so someone may tell me it's fixed..or is there a workaround?


Usually ZPublisher marshalls varname.something to a composite type
(mapping) - so you should see something like imagename in your
REQUEST.form. (just make a simple script: return context.REQUEST
to find out)
In your case, x and y are attributes of that variable.

HTH
Tino

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Multiple SUBMIT images on one form

2006-02-06 Thread Andrew Milton
+---[ Richard Smith ]--
| I gather that the problem whereby having more than one IMG submit on a 
| single form causes some browsers (IE but not firefox) problems is well 
| known.  The problem is solved by using the positional attributes x,y in 
| a cgi script.
| 
| However, using Zope I cannot see how to access these atributes anmd 
| certainly request.form does not appear to give me enough information to 
| assertain which button has been submitted.  I'll confess to still using 
| 2.7.2 so someone may tell me it's fixed..or is there a workaround?

Off the top of my head;

request.name_of_image.x should work.
request.form.name_of_image.x should work too.

I haven't tried this for a while though, but, it's a quick thing you can try.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Multiple SUBMIT images on one form

2006-02-06 Thread Richard Smith

Andrew Milton wrote:


+---[ Richard Smith ]--
| I gather that the problem whereby having more than one IMG submit on a 
| single form causes some browsers (IE but not firefox) problems is well 
| known.  The problem is solved by using the positional attributes x,y in 
| a cgi script.
| 
| However, using Zope I cannot see how to access these atributes anmd 
| certainly request.form does not appear to give me enough information to 
| assertain which button has been submitted.  I'll confess to still using 
| 2.7.2 so someone may tell me it's fixed..or is there a workaround?


Off the top of my head;

request.name_of_image.x should work.
request.form.name_of_image.x should work too.

I haven't tried this for a while though, but, it's a quick thing you can try.

 


Ah yes, thanks for the pointers.

I was using BUTTON...IMG./BUTTON.

Moving to INPUT type=image   name=fredINPUT
type=image... name=bill gives
request.form.bill={x:,y:.} if bill is clicked.  And it works in IE.

Thanks




___ 
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo http://uk.photos.yahoo.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )