dcsimg
Results 1 to 12 of 12

Thread: [RESOLVED] How to ignore WebBrowser script errors ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    14

    Resolved [RESOLVED] How to ignore WebBrowser script errors ?

    Hi,
    I'm try Webbrowser1.silent = True but not working
    How do i ignore errors ?
    Thanks, Hasan

  2. #2
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: How to ignore WebBrowser script errors ?

    Fixing the errors are even better than fighting against those popup messageboxes.

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,007

    Re: How to ignore WebBrowser script errors ?

    Have a look at this and this if it helps.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    14

    Re: How to ignore WebBrowser script errors ?

    Hi again, it didn't fix the problem, how to ignore this errors with VB ?



    I need help, thanks.
    Hasan

  5. #5
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: How to ignore WebBrowser script errors ?

    Remove or fix the errorenous javascript content on your page, that is causing the javascript error window to be shown.

    Alternatively, you can try to set the following property, before loading a webpage.

    Code:
      WebBrowser1.Silent = True

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    14

    Re: How to ignore WebBrowser script errors ?

    Quote Originally Posted by getElementByID
    Hi,
    I'm try Webbrowser1.silent = True but not working
    How do i ignore errors ?
    Thanks, Hasan
    Thanks.

  7. #7
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: How to ignore WebBrowser script errors ?

    that weird WebBrowser1.Silent = True should work
    Live life to the fullest!!

  8. #8
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: How to ignore WebBrowser script errors ?

    Quote Originally Posted by Karl J. Sak at planetsourcecode.com
    You see every time a webbrowser control is run, it automatically sets webbrowser.silent=false. Setting it to true during development doesn't work. What you need to do is run a seperate control. I used a timer control in the form load event, to set the .silent property to true. I then set the timer.enabled=false. The silent property is now set and you won't have to worry about script messages again. So far every web site with popups has been blocked and no script errors. In the source example I also included a way to control popups using the ctrl key.
    http://www.planet-source-code.com/vb...43907&lngWId=1

  9. #9

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    14

    Re: How to ignore WebBrowser script errors ?

    I moved Webbrowser1.Silent = True code in Timer source and set interval to 5. Worked fine really
    Thanks all for help!
    Hasan

  10. #10
    New Member
    Join Date
    Aug 2015
    Posts
    2

    Re: [RESOLVED] How to ignore WebBrowser script errors ?

    I may be a bit late for this (I know I am.) But for future people;
    Visual Basic 2010 needs the command:
    Code:
    WebBrowser1.ScriptErrorsSuppressed() = True
    To be set in place for error messages to stop. I put it in at Form1_Load

  11. #11
    New Member
    Join Date
    Aug 2015
    Posts
    2

    Re: [RESOLVED] How to ignore WebBrowser script errors ?

    I may be a bit late for this (I know I am.) But for future people;
    Visual Basic 2010 needs the command:
    Code:
    WebBrowser1.ScriptErrorsSuppressed() = True
    To be set in place for error messages to stop. I put it in at Form1_Load

  12. #12
    Junior Member scrapersNbots.com's Avatar
    Join Date
    Dec 2016
    Location
    Torrington, CT
    Posts
    25

    Post Re: [RESOLVED] How to ignore WebBrowser script errors ? ก้้้้้้้้้้้้้้้้้้้้

    Quote Originally Posted by getElementByID View Post
    Hi,
    I'm try Webbrowser1.silent = True but not working
    How do i ignore errors ?
    Thanks, Hasan
    Very Easy Fix - ก้้้้้้้้้้้้้้้้้้้้

    Code:
    Private Sub mWB_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    mWB.Silent = True
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width