Forms with multiple submit buttons vs 'form' objects with single 'submit' methods

neil.fitzgerald at ic.ac.uk neil.fitzgerald at ic.ac.uk
Fri Apr 14 12:58:59 EDT 2006


Paul Rubin wrote:
> neil.fitzgerald at ic.ac.uk writes:
> >   Here's my question:  Suppose a form has more than one submit button.
> > Now the COM 'form' object has a 'submit' method that doesn't take any
> > arguments, so how do I tell it which button I want to press?
>
> What difference does it make?  Don't they all do the same thing?

Not in this case, no.

If you want to see an example of how the button you press might make a
difference, go to www.google.com.

What I'm dealing with, basically, is a form consisting of lots of
<INPUT type="image" name=whatever, value=whatever... > tags, which is
being used purely as a collection of links.  However, this arrangement
means that they don't appear as links in the document object's "links"
collection.

Now in the case of Google, the form contains a pair of 'items'
corresponding to the two buttons, and each item has a click method, and
so everything works out fine.  However, in the page I'm trying to
navigate, the form doesn't possess any 'items' whatsoever.

Anyway, it's seeming more and more likely to me that the page was
specifically designed to prevent anyone doing what I'm trying to do
(which is not in any way nefarious, but if I succeeded then it would
only take a small modification to make it very destructive indeed.)
Hence, I'm giving up.

Sorry for the waste of bandwidth.




More information about the Python-list mailing list