Re: web browser control question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: web browser control question
    ... No matter how you click the button, your browser is going to respond by ... www.dictionary.com has a textbox and a button. ... you simply send the request as if those things had happened. ... Supposing you wanted to find the HTTP entry, ...
    (microsoft.public.vb.general.discussion)
  • Re: Custom 401 page problems
    ... Since you configured IIS to send a staic for this ... Now, a 401 response comes back to the client, and the entite body is the ... it is going to make a new request for this resource ... What request do you think the browser makes to fetch the 401.gif ??? ...
    (microsoft.public.inetserver.iis)
  • Re: How to write something to a html textfield and send it?
    ... > No need for controlling any particular browser. ... I'm not familiar with HTTP user ... and building the request in your program. ... The server doesn't know anything about a textfield; ...
    (comp.programming)
  • Re: automatic use of cores for different threads, was: Stupid question?
    ... own self-interest in having your question answered. ... So why get offended when someone makes that helpful suggestion to you? ... It's about your taking offense at the fact that Ben didn't use the word "please" when there was no reason to take such offense, or even to comment on the lack of the word at all. ... For you to be offended by the lack of it in a context where no request at all was being made is silly. ...
    (microsoft.public.dotnet.languages.csharp)
  • Basic Authorization Security Issue?
    ... seems like closing the browser ... When an non-authorized URL request in our intranet web server is attempted, ... resent with the basic authorization credentials and the user is logged in. ...
    (microsoft.public.security)