Results 1 to 2 of 2

Thread: [2005]Click submit button without ID tag.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    9

    [2005]Click submit button without ID tag.

    Hi! I readed this very useful post:
    http://www.vbforums.com/showthread.php?t=416275
    I searched and i couldn´t find it. So I ask :
    Like in www.scour.com, the submit button hasn´t got any "id" tag, so I can´t click it by:
    [CODE=vb]DirectCast(GetCurrentWebForm.item("*****", 0), mshtml.HTMLButtonElement).click()[/CODE]

    and if I use:
    [CODE=vb]GetCurrentWebForm.submit()[/CODE]
    when i clicked a "Fill & Submit" button, the field became empty.
    Thanks in advance!

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2005]Click submit button without ID tag.

    That button on scour.com is this element
    Code:
    <input type="submit" value=" Scour " accesskey="s" title="Search socially" class="searchbutton" />
    You can use GetElementByTagName to get a collection of input element, then loop thru the collection test the type and value attributes. Once you find it, you invoke the click.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width