Results 1 to 15 of 15

Thread: webbrowser click problem [ please help ]

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    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:&nbsp;</div
            <
    div
            <
    input name="uploadedfile" type="file" size="50"
            </
    div
    i can't write code click button ( browse file button )

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    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")

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    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")

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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?

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    Re: webbrowser click problem [ please help ]

    Quote Originally Posted by jmcilhinney View Post
    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

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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.

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    Re: webbrowser click problem [ please help ]

    Quote Originally Posted by jmcilhinney View Post
    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

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: webbrowser click problem [ please help ]

    Quote Originally Posted by Fecr-i.Muhayyel View Post
    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.

  10. #10
    Frenzied Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    1,191

    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 (???).

  11. #11

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    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

  12. #12

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    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

  13. #13
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: webbrowser click problem [ please help ]

    Quote Originally Posted by Fecr-i.Muhayyel View Post
    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.
    Quote Originally Posted by Fecr-i.Muhayyel View Post
    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.

  14. #14

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    13

    Re: webbrowser click problem [ please help ]

    i think this forum name is visual basic forums ok no problem.

  15. #15
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    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
  •  



Click Here to Expand Forum to Full Width