-
Aug 20th, 2018, 02:14 PM
#1
Thread Starter
New Member
webbrowser click problem [ please help ]
This website
PHP Code:
<form enctype="multipart/form-data" action="index.php" method="post" onSubmit="if(document.forms[0].uploadedfile.value == '') {alert('Please select a file'); return false;}else{if (document.forms[0].uploadedfile.value.match(/([^\/\\]+)(\.pdf)$/i) ) {window.parent.startProgress(); return true;}else{alert('Please select a PDF file'); return false;} }">
<div class="uploadform_style" style="font:normal 14px Arial, Helvetica, sans-serif; color:#2a2a2a; background:#ffffff;">
<input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value=""/>
<input type="hidden" name="MAX_FILE_SIZE" value="52428800" />
<div style="float:left; margin:2px; 0 0 0;">Choose a local file: </div>
<div>
<input name="uploadedfile" type="file" size="50">
</div>
i can't write code click button ( browse file button )
-
Aug 20th, 2018, 09:50 PM
#2
Re: webbrowser click problem [ please help ]
Firstly, you have posted in the wrong forum. This is the VB.NET CodeBank forum, which is for sharing working code snippets. If you have a question regarding VB.NET code then it belongs in the VB.NET forum. I have asked the mods to move this thread. Please don't create a duplicate in the mean time.
Secondly, is that actually PHP code? It appears not. It appears to be HTML code. In that case, why have you used the PHP formatting tag, especially when there's a button for the HTML formatting tag on the toolbar right next to the PHP one? Please take the time to make your post as clear as possible for the same of those you would like to volunteer their time to help you. Using the most appropriate formatting tags is one way to do that.
Finally, you say that you can write the code to do what you want. In order to know that you can't, you'd have to have tried to do so. You need to show us what you have tried. For all we know, you're already 99% of the way there. Please don't ask people to write things from scratch for you. If you're having difficulty with something, show us what you've done and we can then try to address what you're doing wrong. That is a far better way to learn because it can help fix faults in your thinking and thus help prevent future issues too.
-
Aug 21st, 2018, 01:03 AM
#3
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
sorry sir , i am little speak english
i use this codes but not working
Code:
If link.GetAttribute("className") = "single_like_button btn3-wrap" Then
link.InvokeMember("Click")
End If
Code:
WebBrowser1.Document.All("button id").InvokeMember("click")
-
Aug 21st, 2018, 01:05 AM
#4
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
sorry sir , i am little speak english
i use this codes but not working
Code:
If link.GetAttribute("className") = "single_like_button btn3-wrap" Then
link.InvokeMember("Click")
End If
Code:
WebBrowser1.Document.All("button id").InvokeMember("click")
-
Aug 21st, 2018, 01:31 AM
#5
Re: webbrowser click problem [ please help ]
It's not clear what you're even trying to click. I see two hidden fields and a file upload control in that code but no buttons and nothing that remotely corresponds to what you specify in that VB code. "single_like_button btn3-wrap" is nowhere in the code form post #1. If the button you want to click doesn't exist then of course you won't be able to click it. If it does exist, why isn't it in the code you posted?
-
Aug 21st, 2018, 01:49 AM
#6
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
Originally Posted by jmcilhinney
It's not clear what you're even trying to click. I see two hidden fields and a file upload control in that code but no buttons and nothing that remotely corresponds to what you specify in that VB code. "single_like_button btn3-wrap" is nowhere in the code form post #1. If the button you want to click doesn't exist then of course you won't be able to click it. If it does exist, why isn't it in the code you posted?
i know sir this i think this code javascript
Code:
onSubmit="if(document.forms[0].uploadedfile.value == '') {alert('Please select a file'); return false;}else{if (document.forms[0].uploadedfile.value.match(/([^\/\\]+)(\.pdf)$/i) ) {window.parent.startProgress(); return true;}else{alert('Please select a PDF file'); return false;} }">
i try this but not working
Code:
WebBrowser1.Document.All("if(document.forms[0].uploadedfile.value == '') {alert('Please select a file'); return false;}else{if (document.forms[0].uploadedfile.value.match(/([^\/\\]+)(\.pdf)$/i) ) {window.parent.startProgress(); return true;}else{alert('Please select a PDF file'); return false;} }">").InvokeMember("click")
i try this not working
Code:
If link.GetAttribute("onSubmit") = "if(document.forms[0].uploadedfile.value == '') {alert('Please select a file'); return false;}else{if (document.forms[0].uploadedfile.value.match(/([^\/\\]+)(\.pdf)$/i) ) {window.parent.startProgress(); return true;}else{alert('Please select a PDF file'); return false;} }">
<div class="uploadform_style" style="font:normal 14px Arial, Helvetica, sans-serif; color:#2a2a2a; background:#ffffff;">" Then
link.InvokeMember("Click")
End If
-
Aug 21st, 2018, 02:49 AM
#7
Re: webbrowser click problem [ please help ]
What you're doing doesn't make sense. You really ought to learn the basics first. You presumably want to submit that form. If you were viewing the page in a browser, how would you submit that form? Obviously not by clicking the form itself, because that's nonsensical.
-
Aug 21st, 2018, 02:50 PM
#8
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
Originally Posted by jmcilhinney
What you're doing doesn't make sense. You really ought to learn the basics first. You presumably want to submit that form. If you were viewing the page in a browser, how would you submit that form? Obviously not by clicking the form itself, because that's nonsensical.
i join your sir please help how i am click this button with webrowser codes
-
Aug 21st, 2018, 05:49 PM
#9
Re: webbrowser click problem [ please help ]
Originally Posted by Fecr-i.Muhayyel
i join your sir please help how i am click this button with webrowser codes
WHAT BUTTON? There is no button in the code you have posted. We can't tell you how to click a button that doesn't exist.
-
Aug 22nd, 2018, 07:40 AM
#10
Re: webbrowser click problem [ please help ]
There is a submit button he didn't show in the first post to post the form and it runs that javascript when clicked.
Code:
<input type="submit" onclick="return submit_form();" value="Unlock" style="border:0px; width:79px; height:31px; color:#00b7fb; font-size:16px; font-weight:bold; margin:10px 41px 0 0; background:#afc96a; padding-bottom:2px; background-image: url('/images/unlock_button.gif')">
It appears he wants some way to programmatically click that button via a webbrowser control.
Seeing as it is a PDF cracking site, that may violate our TOS (???).
-
Aug 22nd, 2018, 01:55 PM
#11
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
@jmcilhinney : form1 button and you will help me ? i translate your senteces but your senteces is very angry, why ? i want to learn something...
@topshot : that's right i will make cracker(pdf) but i can't
-
Aug 22nd, 2018, 01:56 PM
#12
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
@jmcilhinney : form1 button and you will help me ? i translate your senteces but your senteces is very angry, why ? i want to learn something...
@topshot : that's right i will make cracker(pdf) but i can't
-
Aug 22nd, 2018, 06:18 PM
#13
Re: webbrowser click problem [ please help ]
Originally Posted by Fecr-i.Muhayyel
your senteces is very angry, why ? i want to learn something...
I'm angry because I have asked you multiple times which button you want to click and you have refused to actually provide that information. The very first thing you should learn is to provide ALL the relevant information when posting a question. Asking us how to click a button that we know nothing about is a very poor question. It doesn;t really matter what language you speak; it should be common sense to provide people with the information relevant to your problem if you want them to help you solve it.
Originally Posted by Fecr-i.Muhayyel
i will make cracker(pdf)
I'm afraid you won't be doing that with our help because it is indeed against the rules of this form.
-
Aug 23rd, 2018, 01:31 PM
#14
Thread Starter
New Member
Re: webbrowser click problem [ please help ]
i think this forum name is visual basic forums ok no problem.
-
Aug 24th, 2018, 05:37 PM
#15
Re: webbrowser click problem [ please help ]
Making a cracker is against the TOS you agreed to when you signed up to this forum. We do not support or condone that behavior. Do not ask about it again.
My usual boring signature: Nothing
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
|