-
Jul 2nd, 2012, 07:56 PM
#1
Thread Starter
Junior Member
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
-
Jul 2nd, 2012, 08:18 PM
#2
Lively Member
Re: Disable Javascript in Webbrowser ?
Wrong Post.. Sorry / Free Bump :X
-
Jul 3rd, 2012, 02:30 AM
#3
Thread Starter
Junior Member
Re: Disable Javascript in Webbrowser ?
I need help, seriously.
Originally Posted by VBbbq
Wrong Post.. Sorry / Free Bump :X
Thanks anyway
-
Jul 4th, 2012, 05:15 AM
#4
Thread Starter
Junior Member
Re: Disable Javascript in Webbrowser ?
bump again. my question is similar to this
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.!!!
-
Jul 5th, 2012, 09:08 AM
#5
Lively Member
Re: Disable Javascript in Webbrowser ?
Maybe this:
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:
If webbrowser1 is navigating to website, get tag name "script", and attribute "text", then change it to nothing if valid operation.
Last edited by VBbbq; Jul 5th, 2012 at 06:13 PM.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|