473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Hi all,

I'm using pywin to write a script that will commandeer internet
explorer to go to a certain website, where it will navigate menus, post
forms, and eventually retrieve certain data.

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?

I'll be *unbelievably* grateful, for the rest of my natural life, to
whomever has the answer to this.

(Yeah, I realize it's more of a COM question than a Python question.
If you know of a more suitable group, or a website where such questions
are dealth with then by all means redirect me. I'll be exceedingly
grateful, though perhaps not for the rest of my natural life.)

Neil

Apr 13 '06 #1
4 1607
<ne*************@ic.ac.uk> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi all,

I'm using pywin to write a script that will commandeer internet
explorer to go to a certain website, where it will navigate menus, post
forms, and eventually retrieve certain data.

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?

I'll be *unbelievably* grateful, for the rest of my natural life, to
whomever has the answer to this.

(Yeah, I realize it's more of a COM question than a Python question.
If you know of a more suitable group, or a website where such questions
are dealth with then by all means redirect me. I'll be exceedingly
grateful, though perhaps not for the rest of my natural life.)

Neil


Perhaps instead of trying to contort IE to y
Apr 13 '06 #2
<ne*************@ic.ac.uk> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi all,

I'm using pywin to write a script that will commandeer internet
explorer to go to a certain website, where it will navigate menus, post
forms, and eventually retrieve certain data.

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?

I'll be *unbelievably* grateful, for the rest of my natural life, to
whomever has the answer to this.

(Yeah, I realize it's more of a COM question than a Python question.
If you know of a more suitable group, or a website where such questions
are dealth with then by all means redirect me. I'll be exceedingly
grateful, though perhaps not for the rest of my natural life.)

Neil


Perhaps instead of trying to contort IE to your will, you might take a look
at twill. I think it will do what you need in a much less roundabout way.

-- Paul
Apr 13 '06 #3
ne*************@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?
Apr 14 '06 #4
Paul Rubin wrote:
ne*************@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.

Apr 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phillip Windell | last post by:
This is really an HTML question I think, but it probably won't take much effort to answer (unless I'm answering or course). The HTML is all ASP generated and the ASP generates exactly what I want...
2
by: sandyde2 | last post by:
Hi all, I get the tough problem and expect to get help.. In a html page, I dynamically created many forms which named as NO+business_id. In each form there are two submit buttons to...
2
by: Michael Hill | last post by:
Is it possible to have nested forms? <form name="form1" method="post" action="pgm1"> <input type="text1"> <form name="form2" method="post" action="pgm2"> <input type="text2"> <input...
65
by: SamMan | last post by:
A question came up at work from one of our clients about forms on their site. The data from these forms are processed by a PHP script and if all goes well, a thank you screen appears. Sometimes,...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
6
by: salmobytes | last post by:
After a javascript-generated post event (this is a post, not ajax messaging) the current screen has to be redrawn. But on *long forms* (longer than a single screen) then the current screen...
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.