Re: web browser control question



thats a good suggestion, but clicking on the button generates a unique
session id, so that wouldn't work....


Larry Serflaten wrote:
<spy4phun@xxxxxxxxx> wrote
I am attempting to click a button on a web page through vb. I am using
WebBrowser.Document.documentElement.all("textboxname").Value =
"something"
to fill in text boxes. The button i need to click displays like this in
the HTML:

<INPUT tabIndex=15 type=image height=22 alt=submit width=46
src="ts_btn_submit.gif" border=0>


How would I click this button using
WebBrowser.Document.documentElement.all, or any other way...

No matter how you click the button, your browser is going to respond by
sending data back to the server. That data may include the text you entered
in the form, it may be a request, and it may contain any other items the
creators planned to send.

If you stopped the process just long enough to take note of what the
browser sends, then you really need not try to enter text, or press buttons,
or whatever else. All you really need to do is send the message back to
the server that the browser would have sent had you done those things.

For example, www.dictionary.com has a textbox and a button. You
could go there and type something in the textbox and press the button,
or you could try your programatic way of doing that, or, as I am
suggesting, you simply send the request as if those things had happened.

Supposing you wanted to find the HTTP entry, you could click on the
link above and type in HTTP just before pressing the button, or, you
could just send the request the browser sends, after you did those things:
http://dictionary.reference.com/search?q=http&db=*

Clicking on that link produces the same result AS IF you entered the
text and pressed the button.

Can you do something similar in your own situation?

LFS

.