473,804 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1628
<ne************ *@ic.ac.uk> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.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.goo glegroups.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
2359
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 but the resulting HTML isn't working right. It consists of multiple forms on a page with each form using a unique name. The submit button in each form also uses a unique name. The forms are supposed to submit a single value from a hidden field...
2
17192
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 "release_or_not". of course in the server side I validate those values as well. However, because this page is for admin to use so that I do not need to care any hacker action. Hence, in the client side javascript I validate those values and give it a popup...
2
97874
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 type="submit" value="submit form2"> </form> <input type="submit" value="submit form1"> </form>
65
4520
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, when you go back to the form (by clicking the back button), the data is still there in the form fields. Other times it is not. The client would like to ensure the data remains, as they sometimes have multiple submissions to make with similar...
32
14917
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 ((someString.IndexOf("something1",0) >= 0) || ((someString.IndexOf("something2",0) >= 0) ||
5
14135
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
1782
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 positioning is lost, and the current form ends up redrawn, with a different vertical positioning--after the post event. However, If I sent the x,y mouse position as post parameters, and if the current widget (that generated the post) had
6
2661
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. so far I have built a traditional app, switchboard, forms, etc. Part of this app is to automate the forms they previously prepared manually. After the app was built and works just fine, I find out there are several case managers using MS word...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.