Results 1 to 25 of 25

Thread: problem in webvew

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    problem in webvew

    where is mistake in this code
    Code:
    WebView21.ExecuteScriptAsync("document.getElementsById('tMbPAR1').SetAttribute('value', '1511151')")
    plz hep

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    10,701

    Re: problem in webvew

    "Code is like humor. When you have to explain it, it’s bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    Previously, I use webbrowser tool
    but now an error is appear
    I try to use "webview2" tool
    but it is does not work

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,898

    Re: problem in webvew

    Please learn how to write a good question. Provide a FULL and CLEAR explanation of the problem, which includes a description of what you're trying to achieve, how you're trying to achieve it (including relevant code) and what happens when you try (including expected and actual behaviour or specific compilation or run-time error messages).

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    It's not my fault that you don't understand

  6. #6
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    742

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    It's not my fault that you don't understand
    but it is your responsibility to explain your problem correctly.

    Quote Originally Posted by muad12 View Post
    Previously, I use webbrowser tool
    but now an error is appear
    I try to use "webview2" tool
    but it is does not work
    first line : what does that mean "I use webbrowser tool" ? show us your relevant code and not just one line. And explain what you are trying to do/get/obtain
    second line : which error ? provide more information
    third line : what do you mean by "webview2" tool ?
    fourth line : "doesn't work" means nothing : what do you expect from the code, what is the result you get, is there any error? in this case which one?

    what do you expect from us with just this ?

    Quote Originally Posted by muad12 View Post
    where is mistake in this code
    Code:
    WebView21.ExecuteScriptAsync("document.getElementsById('tMbPAR1').SetAttribute('value', '1511151')")
    plz hep
    ? sorry some of us are average/good/excellent or expert but not wizard.

    by the way, you already have a thread dealing with this subject : https://www.vbforums.com/showthread....-invoke-jQuery no need to multiply the threads on the same topic
    Last edited by Delaney; Nov 20th, 2021 at 05:21 PM.
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  7. #7
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,898

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    It's not my fault that you don't understand
    Yes, it is. You know all the details about your problem. We know nothing other than what you tell us. If you don't provide sufficient information for us to understand the problem, who else's fault could it possibly be? Apparently you think that we should be able to understand based on the information you have provided. You are wrong. If you would like strangers on the internet to volunteer their time to help you, maybe you should consider making an effort to help us do so rather than getting defensive when we point out that your question is lacking in detail and explain how you can make it better. It's not my fault you don;t know how to write a good question but I tried to help you do better so that I and others can help you. Do you want our help or not? If you do, make an effort. If you're not prepared to make that effort, why should we?

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    It's okay to say I don't know.
    To say I don't know is better than to pretend to know and to claim that others do not how know how to ask!

  9. #9
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,874

    Re: problem in webvew

    You posted a single line of code and only ask what’s wrong.
    No further information given.
    The syntax seems correct, so the problem is either in the parameters used or you expect different behavior.

    So break your single line of code to multiple statements and check the value of the variables step for step

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    This is a simple project that clarifies the question

    https://www.dropbox.com/s/06aby2vk0y...sApp3.zip?dl=0

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,839

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    where is mistake in this code
    Code:
    WebView21.ExecuteScriptAsync("document.getElementsById('tMbPAR1').SetAttribute('value', '1511151')")
    "document.getElementsById('tMbPAR1').SetAttribute('value', '1511151')"

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    Quote Originally Posted by Schmidt View Post
    "document.getElementsById('tMbPAR1').SetAttribute('value', '1511151')"
    You mean it should be deleted?

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    This is a simple project that clarifies the question

    https://www.dropbox.com/s/06aby2vk0y...sApp3.zip?dl=0
    I hope that qustion is clear

  14. #14
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    742

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    You mean it should be deleted?
    yes...
    a quick look at the documentation would have given you the answer : https://docs.microsoft.com/fr-fr/dot...owsdesktop-6.0
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  15. #15
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,025

    Re: problem in webvew

    All this drama caused by a single letter. I love this forum.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  16. #16

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    Quote Originally Posted by Delaney View Post
    yes...
    a quick look at the documentation would have given you the answer : https://docs.microsoft.com/fr-fr/dot...owsdesktop-6.0
    thanks for help but
    I did that and it didn't work
    The form is not filled out

  17. #17

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

  18. #18
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,839

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    I did that and it didn't work
    "document.getElementById('pwd').SetAttribute('value', '1511151')"

  19. #19
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    346

    Re: problem in webvew

    Deleted
    Last edited by Peter Porter; Nov 27th, 2021 at 04:36 PM.

  20. #20

    Thread Starter
    Junior Member
    Join Date
    Nov 2021
    Posts
    17

    Re: problem in webvew

    I tried to explain the problem but you did not understand!
    I attached a simple example to clarify but you did not understand!

    You seem to be making fun of me!
    So I don't want you to answer
    I will look for it myself and God will help me
    Thank you, good bye

  21. #21
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    346

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    I tried to explain the problem but you did not understand!
    I attached a simple example to clarify but you did not understand!

    You seem to be making fun of me!
    So I don't want you to answer
    The problem is that you don't understand how you present information is wrong, so you keep making this same mistake in an endless loop!

    Everyone above could've helped you out easily, but you wouldn't provide enough information when asked for it. I'm not sure if it's because you don't understand what's going on in Visual Studio, or you simply don't understand what we ask of you.

    Quote Originally Posted by muad12 View Post
    Previously, I use webbrowser tool...
    For what? What are you using it for?

    Quote Originally Posted by muad12 View Post
    ...but now an error is appear
    What error? What does it say? Why haven't you provided us enough lines of code to proofread?

    Quote Originally Posted by muad12 View Post
    I try to use "webview2" tool...
    For what? What are you trying to use it for?

    Quote Originally Posted by muad12 View Post
    ...but it is does not work
    Why not? Is there an error? What does it say? Where are your lines of code?

    Quote Originally Posted by muad12 View Post
    Quote Originally Posted by Delaney View Post
    yes...
    a quick look at the documentation would have given you the answer : https://docs.microsoft.com/fr-fr/dot...owsdesktop-6.0
    thanks for help but
    I did that and it didn't work
    The form is not filled out
    We shouldn't have to wait until your 7th reply to finally tell us what you're trying to do, but even then you didn't show us the error.

    You see, muad, the problem is you.

    We can't see what you see! We can't read your mind!

    The one line of code you provided before, and the other useless information wasn't enough. I wasn't making fun of you in my deleted reply, but telling you the truth, that you come off lazy. The smiley emojis was to lighten the mode so you would calm down and try to logically think, but it seems like you're not capable to do so.

    Programming can't be handled like typical life problems (leaky roof, clogged toilet, power outage). You have to give enough details in order to get help when it comes to programming. Describing your programming problem like a typical life problem will get you nowhere, because no one will waste their time with you if you don't use your time to provide enough detailed information.

    Well, if you handle life problems like programming, now you know why no showed-up to fix your leaky roof (if you had one). Saying "house" as your address on the phone is not enough information!

    Helpful detailed information is your friend!

    Quote Originally Posted by muad12 View Post
    I will look for it myself and God will help me
    Thank you, good bye
    God helps those who help themselves and others. But if you're unwilling to, there is nothing he can do to guide you.

    It's all on you, muad. Good luck!
    Last edited by Peter Porter; Nov 27th, 2021 at 08:36 PM.

  22. #22
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    742

    Re: problem in webvew

    Quote Originally Posted by Schmidt View Post
    "document.getElementById('pwd').SetAttribute('value', '1511151')"
    .net is not case sensitive so the S instead of s should not be a problem even in a string but it's worth the try just in case.
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  23. #23
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,025

    Re: problem in webvew

    Quote Originally Posted by Delaney View Post
    .net is not case sensitive so the S instead of s should not be a problem even in a string but it's worth the try just in case.
    You mean to say that JavaScript is case sensitive. .Net case's sensitivity has no bearing on this.

    Quote Originally Posted by muad12 View Post
    I tried to explain the problem but you did not understand!
    I attached a simple example to clarify but you did not understand!

    You seem to be making fun of me!
    So I don't want you to answer
    I will look for it myself and God will help me
    Thank you, good bye
    Drama queen this one.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  24. #24
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    346

    Re: problem in webvew

    Quote Originally Posted by Niya View Post
    Quote Originally Posted by muad12 View Post
    I tried to explain the problem but you did not understand!
    I attached a simple example to clarify but you did not understand!

    You seem to be making fun of me!
    So I don't want you to answer
    I will look for it myself and God will help me
    Thank you, good bye
    Drama queen this one.
    I thought my deleted reply was lighthearted enough, but it wasn't for him.

    Gonna leave this kinda business in your hands and the others.

  25. #25
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,898

    Re: problem in webvew

    Quote Originally Posted by muad12 View Post
    I will look for it myself and God will help me
    One wonders why you came here at all if you can do that now. The problem here is that we want to help you but you won't even consider the possibility that you're not doing enough to enable us to do so. Multiple people seem not to understand what you're talking about. Multiple people who have understood many a question before and provided answers to them. The common link here is you. The problem is you. If you were prepared to make the effort to provide the information required then this issue could have been resolved well before now. Instead, you've got no help and you've alienated several people who might have helped you now and in the future. You should take a long, hard look at yourself. Maybe ask God how best to write a question in a forum. I expect he'll agree with the people who have been asking and answering them for years over the person who just started this month. Mind you, given that people are just talking to themselves when they talk to God, maybe he will agree with you. That would be good evidence against his existence, I guess.

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