Results 1 to 9 of 9

Thread: Webbrowser submit problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Webbrowser submit problem

    Hi guys,,

    i got this in the source code :

    Code:
    <td class="cat" colspan="2" align="center">
    			<input class="btnlite" type="submit" tabindex="5" name="preview" value="Preview" />
    			&nbsp; <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="Submit" />
    			&nbsp; <input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="Save" />			&nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="Cancel" />

    and i tried:
    W.Document.All("post").Click
    W.Document.All("submit").Click
    W.Document.All("btnmain").Click


    but nothing seems to work???
    Thanks for helping me out.

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Webbrowser submit problem

    You have 4 buttons. "preview", "post", "save", and "cancel". You tried "post" and it should have worked. Try the other three by their names.

    <input class="btnlite" type="submit" tabindex="5" name="preview" value="Preview" />
    <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="Submit" />
    <input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="Save" />
    <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="Cancel" />

    If this doesn't work please give any error messages that occured.

    Make sure the page has fully loaded and it is the page with the buttons before you try any of those .click statements
    Last edited by jmsrickland; Jan 16th, 2009 at 03:36 PM.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Webbrowser submit problem

    Yes i tried...my friend made it...

    I think it's a ieframe.dll problem hmmm

    but i cant replace it
    Thanks for helping me out.

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Webbrowser submit problem

    If it is IFrame then look at this example
    Attached Files Attached Files

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Webbrowser submit problem

    i will look at tit now...thanks

    i did look at it...


    I really don't know what how to use the frames..and which name to put as frame? hmm

    Btw that code i wrote initially works on 2 other computers...not on mine

    And i still get that error 438 !


    And now i tried using sendkeys...

    i've sent

    SendKeys "{TAB}", True
    SendKeys "{TAB}", True
    SendKeys "{ENTER}", True

    and it worked...submit button was pressed...but that's not the general slolution...

    and even ig that worked i get runtime error -5 and the project stops ???? no hiighlited error is shown
    Last edited by batori; Jan 17th, 2009 at 05:50 AM.
    Thanks for helping me out.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Webbrowser submit problem

    Well i dont see the form name...i figured out how to use forms...but i dont see the form name in the code :S
    Thanks for helping me out.

  7. #7
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Webbrowser submit problem

    Did the example project I posted work?

    Also post the HTML or a link to it so I can see what it is you need to do.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Webbrowser submit problem

    M8...the problem is that...i have some problems with the control...webbrowser...the code i posted here..works perfectly on another 2 computers...

    my pc wont let me click..when the:

    W.Document.All("post").Click

    is in action..i get the error 438 nobody else does..only i do...and i dont know why???


    I tried your code...but it didnt help me that much...
    Thanks for helping me out.

  9. #9
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Webbrowser submit problem

    Then post your code (I mean your VB code) and the document you are trying to deal with otherwise I can't do any more for you.

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