Results 1 to 11 of 11

Thread: help me please quick on webbrowser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    22

    Unhappy help me please quick on webbrowser

    hello i am vb6 user and there is a site with allows you to choose am image then upload it i have loaded with webbrowser and m using this but it just dont work

    WebBrowser1.Document.getelementbyid("media").Value = "C:\Users\junior\Desktop\as.PNG"

    help me plz how can i upload imageName:  ,kjhgfh.PNG
Views: 233
Size:  1.7 KB

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

    Re: help me please quick on webbrowser

    That by itself wont upload. That only puts the path in a variable but you need to send it by clicking on a button probably. You need to post more of the relevant code.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    22

    Re: help me please quick on webbrowser

    then can u write the code how is it done?

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

    Re: help me please quick on webbrowser

    No I cannot. You have the code. The code I am referring to is the same code you used for this:

    WebBrowser1.Document.getelementbyid("media").Value = "C:\Users\junior\Desktop\as.PNG"

    If you knew the name to look for is "media" then use the same code where you got that name from and post it


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    22

    Re: help me please quick on webbrowser

    but its not working.......... everyitime i see new messages in email from vbforums i expect to get my answer plz help

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

    Re: help me please quick on webbrowser

    I know it's not working. You put "C:\Users\junior\Desktop\as.PNG" in a variable on a web page document. You have that document in your WebBrowser and since you knew the name of the variable which is "media" then you must have seen the code or how else did you know the name. So, if you know the name of the variable then I am asking you to post the code that contains that element "media" in it but I need to see more of it so I can find the button name that you need to click on to upload your image


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    22

    Re: help me please quick on webbrowser

    here is the code <input type="file" name="media" value="" width="40">

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: help me please quick on webbrowser

    You need to code the submit button.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

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

    Re: help me please quick on webbrowser

    you have a duplicate thread on this topic, where i have already replied
    file input elements can not be automated in vb6, this is a deliberate browser security precaution, to prevent malware from doing the same

    you would need to post the file using separate code from the webpage, but using information from the webpage
    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

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

    Re: help me please quick on webbrowser

    Quote Originally Posted by kushaladhikari12 View Post
    here is the code <input type="file" name="media" value="" width="40">
    I asked for more of the code so I can find the button in order for you to submit your request. You only posted the part which contains the "media"

    You don't appear to understand what is needed to do what you want


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  11. #11
    Hyperactive Member
    Join Date
    Oct 2013
    Posts
    389

    Re: help me please quick on webbrowser

    Post the WHOLE HTML source of the page please.

Tags for this Thread

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