On Fri, 12 Sep 2003, Jonas Oberg wrote:

> I recently noticed that AxKit::XSP::PerForm (1.83) did not perform
> well with images as submit buttons and Internet Explorer. This might
> be a known problem, but in case it's not, I had to apply this patch to
> make it work well on the browsers I used to test it:
> 
> (It appears that IE does not submit the button name as a parameter,
> but just the coordinates on which the user pressed them).

Yes, as someone else mentioned, this is standard behavior (although it's
possible it's not standards-compliant).

I would recommend you change your patch slightly so it compares the x
coordinate with "" instead of possibly dealing with it like it's an int.
The reason is that if you have a form with an image button and someone
presses the Enter key while focus is on a text input field in the form,
then MSIE will send button.x=0&button.y=0. A 0 wouldn't resolve to "true"
if it's treated like an int.

In other words, change:

> +        if (\$cgi->param(\$cancel) || \$cgi->param(\$cancel.'.x')) {

to:

> +        if (\$cgi->param(\$cancel) || \$cgi->param(\$cancel.'.x') ne '') {


> --- PerForm.pm.old    2003-09-12 10:02:11.000000000 +0200
> +++ PerForm.pm        2003-09-12 10:00:54.000000000 +0200
> @@ -126,7 +126,7 @@
>  
>  if (\$cgi->param('__submitting_$name')) {
>      foreach my \$cancel ([EMAIL PROTECTED]) {
> -        if (\$cgi->param(\$cancel)) {
> +        if (\$cgi->param(\$cancel) || \$cgi->param(\$cancel.'.x')) {
>              no strict 'refs';
>              my \$redirect;
>              \$redirect = \$_cancel_goto{\$cancel};
> @@ -142,7 +142,7 @@
>  
>  if (\$cgi->param('__submitting_$name') && !\$_form_ctxt->{_Failed}) {
>       foreach my \$submit ([EMAIL PROTECTED]) {
> -        if (\$cgi->param(\$submit)) {
> +        if (\$cgi->param(\$submit) || \$cgi->param(\$submit.'.x')) {
>              no strict 'refs';
>              my \$redirect;
>              \$redirect = \$_submit_goto{\$submit};
> 
> 
> 
> -- 
> Jonas �berg
> Systems administrator/webmaster, Department of Informatics,
> School of Economics and Commercial Law, Gothenburg University.
> Phone. +46-31-7732717, Fax. +47-31-7734754
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to