Disable Javascript in Webbrowser ?
How to disable Javascript in a specific website ?
Here're are links, for example :
http://www.zillow.com/homes/11491-SL...W-RD-77385_rb/
http://www.411.com/name/Linda-L-Hawo...ica-IN/4gqss74
Every time my Webbrowser navigates to those links, it takes a serious time to load unnecessary things and it's really annoying. Just disable Javascript in those pages but still keep it enabled in other websites ?
I know it's hard to do that with the default Webbrowser, but is there any way to that ? Any codes to work with the Internet Option without launching it manually through the Control Panel ?
Thanks, I really appreciate if you could guild me :)
Re: Disable Javascript in Webbrowser ?
Wrong Post.. Sorry / Free Bump :X
Re: Disable Javascript in Webbrowser ?
I need help, seriously. :(
Quote:
Originally Posted by
VBbbq
Wrong Post.. Sorry / Free Bump :X
Thanks anyway :thumb:
Re: Disable Javascript in Webbrowser ?
bump again. my question is similar to this
Quote:
Originally Posted by
husnainhadier
hi, i want to set internet zone setting to custom level...(high or low) with vb6
is there any way to do this.?
Example:
Code:
Sub Clear_History()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"
End Sub
or any other way?
help please.
i just want to disable or enable java scripting in web browser with vb6.
i'll do it manually and it's working perfect. but i want to do this with my project automatically with coding.
anyone here to solve this problem.
i have discuss this problem here.
http://www.vbforums.com/showthread.p...45#post4102945
but nothing.!!!:confused:
Re: Disable Javascript in Webbrowser ?
Maybe this:
Quote:
Code:
Public Class Form1
Private Sub WebBrowser1_Navigating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
If e.Url.Equals("http://www.zillow.com/homes/11491-SLEEPY-HOLLOW-RD-77385_rb/") OrElse e.Url.Equals("http://www.411.com/name/Linda-L-Haworth/Attica-IN/4gqss74Then") Then
If WebBrowser1.Document.GetElementsByTagName("script").ToString <> vbNull Then
Dim ScriptElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("script")
For Each scriptElement As HtmlElement In ScriptElements
Dim scriptcName As String = scriptElement.GetAttribute("text").ToString
If scriptcName <> "" And scriptElement.GetAttribute("text").ToString <> Nothing Then
scriptcName = ""
End If
Next
End If
End If
End Sub
End Class
I havent tested it, but it "should" do this:
Quote:
If webbrowser1 is navigating to website, get tag name "script", and attribute "text", then change it to nothing if valid operation.