[Zope] processing checkbox parameters - browser differences

Thomas B. Passin tpassin@mitretek.org
Fri, 8 Jun 2001 14:19:49 -0400


With any problem like this, the first thing to do is to make sure what
exactly the form is returning.  You can use something like <dtml-var
"REQUEST.form">.  If that seems OK, then do the <dtml-in> iteration but just
display the value  rather than passing it to some other method or object.

IE 5 will return check box values just fine.  You should also check the html
that the browser sees to make sure that it is exactly what you wanted.
Also, if you have more than one check box with the same name, that can
confuse your code (though I don't see why it would be different for IE vs
NS).

If the html isn't working right, hard code the html and work with it until
it works right.  Then rewrite your dtml to create that same html.

If you have to ask the list about this after taking these steps, please show
what the form's html looks like (remove any unnecessary elements), including
encoding, method, and action.


Cheers,

Tom P

[Sandy Britain]

>
> I have a dtml method needs to pick up the values ONLY  of checked
> checkboxes in an html
> form whose names are the ID's of objects users want to edit or delete.
...
>
> This works great in netscape 4.x but it doesn't work in IE 5 - it
> doesn't appear to be returning
> the checkboxes with the REQUEST - or perhaps not picking up that any are
>
> checked.
>
> Here is the code from the method that processes the form' action:
>
> <dtml-in "REQUEST.form.items()">
> <dtml-let request_item_id=sequence-key>
>
> <dtml-in "objectValues('myObjectType')">
> <dtml-if expr="id == request_item_id">
>
> ...