Results 1 to 18 of 18

Thread: Javascript problems

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Javascript problems

    I'm making a internet browser. Yes, I am very new to Visual Basic and I am using Microsoft Visual Basic 2010 Express and.. When I visit sites and something on the page is reading from a .js file it returns in a error. How can I fix this?

  2. #2
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: Javascript problems

    Welcome to the forums.

    You have to set "ScriptErrorsSuppressed" property of the WebBrowser to True.

  3. #3
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: Javascript problems

    <vbforums Website doing strange things, please ignore>

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by bergerkiller View Post
    Welcome to the forums.

    You have to set "ScriptErrorsSuppressed" property of the WebBrowser to True.
    I tried looking for "ScriptErrorsSuppressed" but could not find it. Sorry that im a newbie at this.

  5. #5
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    I tried looking for "ScriptErrorsSuppressed" but could not find it. Sorry that im a newbie at this.
    It's just a property like any other, that's accessed from the property window.

    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    It's just a property like any other, that's accessed from the property window.

    I was looking there but it isn't there.

  7. #7
    New Member
    Join Date
    Mar 2011
    Posts
    5

    Re: Javascript problems

    edit

  8. #8
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    I was looking there but it isn't there.
    Are you using the express or full version of the IDE?

    Also, try putting the following in your form's load event if you still can't see the property.

    VB.NET Code:
    1. WebBrowser1.ScriptErrorsSuppressed = True
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  9. #9

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    Are you using the express or full version of the IDE?

    Also, try putting the following in your form's load event if you still can't see the property.

    VB.NET Code:
    1. WebBrowser1.ScriptErrorsSuppressed = True
    I'm using Express and there is a full version?

  10. #10
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    I'm using Express and there is a full version?
    Yeah, but you have to pay for it. I got it free through DreamSpark, but it's super expensive otherwise.

    That might be a feature not in the free version, but that seems highly unlikely.

    Did the code I showed work?
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  11. #11

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    Yeah, but you have to pay for it. I got it free through DreamSpark, but it's super expensive otherwise.

    That might be a feature not in the free version, but that seems highly unlikely.

    Did the code I showed work?
    No it had a error and I clicked the error box and it asked if I wanted to generate a class for it.

  12. #12
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    No it had a error and I clicked the error box and it asked if I wanted to generate a class for it.
    That's really weird. My guess is that this property isn't available in the Express edition or your installation is messed up.

    Or... are you making a WinForms project or WPF?

    Also, what site are you trying to access that you're getting this error on? I'd like to test it on my end.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  13. #13

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    That's really weird. My guess is that this property isn't available in the Express edition or your installation is messed up.

    Or... are you making a WinForms project or WPF?

    Also, what site are you trying to access that you're getting this error on? I'd like to test it on my end.
    http://forumpromotion.net

    Or any site that has like a script on the index that links to a .js file. Also it has posting issues with phpBB only with char typing.

  14. #14
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    http://forumpromotion.net

    Or any site that has like a script on the index that links to a .js file. Also it has posting issues with phpBB only with char typing.
    I'm not getting a javascript error, with or without that property. I've also heard that the web browser control just inherits the properties of IE, since it is essentially just a stripped down version of IE. So if your version of IE doesn't have that property enabled, or something similar to it, that might be the problem.

    What OS are you using? What version of IE do you have installed? What type of project is this? WinForms or WPF?. It's different with WPF, so I need to know.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  15. #15

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    I'm not getting a javascript error, with or without that property. I've also heard that the web browser control just inherits the properties of IE, since it is essentially just a stripped down version of IE. So if your version of IE doesn't have that property enabled, or something similar to it, that might be the problem.

    What OS are you using? What version of IE do you have installed? What type of project is this? WinForms or WPF?. It's different with WPF, so I need to know.
    OS: Windows 7
    IE Version: 9 Beta
    Project is..: Window Form Application

  16. #16
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    OS: Windows 7
    IE Version: 9 Beta
    Project is..: Window Form Application
    That's the same setup as me, with the exception of the VS Pro and I have the RC of IE9. So, my only guess is that this feature isn't available in the Express edition or your installation is messed up.

    You can always try reinstalling it VB Express and see what happens. Other than that, I have no other suggestions. Sorry.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  17. #17

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    8

    Re: Javascript problems

    Quote Originally Posted by weirddemon View Post
    That's the same setup as me, with the exception of the VS Pro and I have the RC of IE9. So, my only guess is that this feature isn't available in the Express edition or your installation is messed up.

    You can always try reinstalling it VB Express and see what happens. Other than that, I have no other suggestions. Sorry.
    I can tell you it was no installing mess up. So it must be because it's Express. Well this sucks. Oh well I can't afford how expensive it is. I will try to get it in the future. Thank you for everything and trying to help me. I am very thankful.

  18. #18
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Javascript problems

    Quote Originally Posted by Titan View Post
    I can tell you it was no installing mess up. So it must be because it's Express. Well this sucks. Oh well I can't afford how expensive it is. I will try to get it in the future. Thank you for everything and trying to help me. I am very thankful.
    Just because you didn't see an error, doesn't mean there wasn't one. That and an installation can get corrupted after it was installed.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

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