Results 1 to 4 of 4

Thread: help in document

  1. #1

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    help in document

    code 1 <INPUT type=submit value="Sign In" name=.sin>
    code 2 <INPUT type=submit value=Finished name=Submit>

    here is 2 code i dont understand why 2 number wont work
    1 code i use as like
    document.all(".sin").click
    its working
    2nd i use as same but its wont working any one got idea why its wont work???


    Code:
    code 2
    
    <TD noWrap align=right>&nbsp;<INPUT type=submit value=Finished name=Submit>&nbsp;<INPUT type=submit value=Cancel name=.cancel> 
        </TD></TR></TBODY></TABLE></CENTER></FORM></CENTER>
    Code:
    code 1
    
    class=yreglgsb><INPUT type=submit value="sin" name=.save></P></FORM></FIELDSET>

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: help in document

    what is the action of the 2 forms

    this really isn't VB, ask a moderator to move to a more appropriate forum
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: help in document

    I'm a bit confused as to exactly what you're trying to do. You need to locate the Item by its name property not it's value property.

    In code 2 above, there are 2 INPUT items, Submit and .cancel to click on Submit you would use:
    Code:
    WebBrowser1.Document.Forms(0).Item("Submit").Click
    To click on the .cancel item you'd use
    Code:
    WebBrowser1.Document.Forms(0).Item(".cancel").Click
    assuming that they are in the first Form on the Page. (If they're not, then replace Forms(0) with Forms(n) where n is the form number-1)

  4. #4

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    Re: help in document

    i had with these code but its wont work

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