|
-
Oct 10th, 2013, 12:02 AM
#1
Thread Starter
Junior Member
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 image
-
Oct 10th, 2013, 01:26 AM
#2
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.
-
Oct 10th, 2013, 01:46 AM
#3
Thread Starter
Junior Member
Re: help me please quick on webbrowser
then can u write the code how is it done?
-
Oct 10th, 2013, 02:11 AM
#4
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.
-
Oct 10th, 2013, 02:16 AM
#5
Thread Starter
Junior Member
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
-
Oct 10th, 2013, 02:28 AM
#6
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.
-
Oct 10th, 2013, 02:57 AM
#7
Thread Starter
Junior Member
Re: help me please quick on webbrowser
here is the code <input type="file" name="media" value="" width="40">
-
Oct 10th, 2013, 04:13 AM
#8
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
-
Oct 10th, 2013, 05:57 AM
#9
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
-
Oct 10th, 2013, 11:27 AM
#10
Re: help me please quick on webbrowser
 Originally Posted by kushaladhikari12
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.
-
Oct 11th, 2013, 05:20 AM
#11
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|