Results 1 to 8 of 8

Thread: mouse click

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2018
    Posts
    6

    mouse click

    I am using vb.net how can i make mouse click on website textbox
    its information is these
    <input type="text" id="username" class="input4"
    autocomplete="off" name="username" value="" required=""
    data-required="" data-pattern="^[a-zA-Z][a-zA-Z0-9]+$"
    data-minlenght="6" data-maxlenght="12"
    onkeyup="clearNonAlphaNum(this)">

    please help me
    Last edited by sh4sh4; Mar 19th, 2018 at 05:16 PM.

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

    Re: mouse click

    Why do you care about a click on a text box? What are you actually trying to achieve? It's more likely that what you care about is when that text box gets focus, which can happen via the keyboard as well as by the mouse.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2018
    Posts
    6

    Re: mouse click

    Quote Originally Posted by jmcilhinney View Post
    Why do you care about a click on a text box? What are you actually trying to achieve? It's more likely that what you care about is when that text box gets focus, which can happen via the keyboard as well as by the mouse.
    There is two id with the same name
    how can i select ?

    <input type="text" id="username" class="input4"
    autocomplete="off" name="username" value="" required=""
    data-required="" data-pattern="^[a-zA-Z][a-zA-Z0-9]+$"
    data-minlenght="6" data-maxlenght="12"
    onkeyup="clearNonAlphaNum(this)">

    <input name="username" id="username" type="text" class="user" autocomplete="off"
    placeholder="Kullanici Adi">

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: mouse click

    Quote Originally Posted by sh4sh4 View Post
    There is two id with the same name
    how can i select ?
    That seems unrelated to your original post. Please provide a FULL and CLEAR explanation of the problem. Don't try to get away with posting as few words as possible. The better description you provide of what you're actually trying to achieve, the better chance that we can provide the best means to achieve it. If we have to keep trying to drag the relevant information out of you, we may tire of it and give up before you get the help you want. You need to help us to help you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2018
    Posts
    6

    Re: mouse click

    Quote Originally Posted by jmcilhinney View Post
    That seems unrelated to your original post. Please provide a FULL and CLEAR explanation of the problem. Don't try to get away with posting as few words as possible. The better description you provide of what you're actually trying to achieve, the better chance that we can provide the best means to achieve it. If we have to keep trying to drag the relevant information out of you, we may tire of it and give up before you get the help you want. You need to help us to help you.
    on the website there is samw id textbox but when i am writing
    WebBrowser1.Document.All("username").SetAttribute("value", username)
    its writen different textboxx with same id "username"

    <input name="username" id="username" type="text" class="user" autocomplete="off"
    placeholder="Kullanici Adi">

    i need to reach second field but i couldnt reach
    <input type="text" id="username" class="input4"
    autocomplete="off" name="username" value="" required=""
    data-required="" data-pattern="^[a-zA-Z][a-zA-Z0-9]+$"
    data-minlenght="6" data-maxlenght="12"
    onkeyup="clearNonAlphaNum(this)">

    please help me

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: mouse click

    And what does that have to do with mouse clicks? Anything? It seems unrelated.

    This seems to be simply a repeat of a question that I answered previously, possibly here or possibly elsewhere. I said then that you should simply get those elements into a collection and then take the second one. You seem to have made no attempt to do that at all. A few minutes of using the Help menu and reading the relevant documentation would have shown you that that All property is type HtmlElementCollection and that type has a GetElementsByName method, that will return a collection of elements with the specified name (name, NOT id). That's your collection, assuming that no other elements have that same name.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2018
    Posts
    6

    Re: mouse click

    How will i do that?
    pleaese help me

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: mouse click

    I already did help you. You seem to be asking me to write your code for you. I'm not willing to do that. This is fairly simple stuff: call a method to get a collection and get an item from that collection. You should be able to at least make an attempt at that. If you're not willing to at least make an effort, I'm not willing to help further. If you are willing to make an effort, let's see it. You can wait to see if someone else will write the code for you if that's what you want, but it won't be me.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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