...

View Full Version : Javascript Blocked In IE



omb2012
11-01-2012, 10:47 PM
When I view my website on my local computer in Internet explorer, my web forms, social buttons, etc do not display because of Internet Explorer saying its blocking scripts/activex.

Is there a way around this since I need my javascript based items to show when visitors view my website or is this even a major problem?

Also, are there any tips for placing javascript on your site so that it doesn't load slow?

Thanks

WolfShade
11-01-2012, 10:54 PM
Are you viewing the document as "file:///C:blah blah blah" or "localhost/index.html"?

If the former, I think that's why it's happening. See if you can view in the browser via http protocol instead of file:.

omb2012
11-01-2012, 10:56 PM
Are you viewing the document as "file:///C:blah blah blah" or "localhost/index.html"?

If the former, I think that's why it's happening. See if you can view in the browser via http protocol instead of file:.

Ok, I will try that when I upload the files to my host. Yes, I am viewing from my computer (file:///C:yadda yadda yadda...)

WolfShade
11-01-2012, 10:58 PM
Viewing from your computer, you can use "http://localhost/index.html" or whatever the document name is. See if that makes a difference.

felgall
11-01-2012, 11:11 PM
Viewing from your computer, you can use "http://localhost/index.html" or whatever the document name is. See if that makes a difference.

That would only work if you have a web server enabled on your computer and the file is in the folder that the server is using.

That IE temporarily blocks the scripts when you run them locally isn't a problem as you can easily click the link to allow them to run - or alternatively switch to using a different browser which doesn't have activex and so doesn't have potential security issues with running scripts locally.

The problem will never occur for visitors to your site because they will be accessing your site off the web and not locally.

Old Pedant
11-02-2012, 03:39 AM
And people with Windows Home versions (XP Home, Vista Home, 7 Home) can *NOT* run IIS (the Microsoft web server). So if they want to test using "http://localhost" they have to install, say, Apache web server. And if a novice is struggling with the fundamentals of JavaScript the odds that they will pull off a successful Apache install are not good.

Philip M
11-02-2012, 09:45 AM
As felgall says, switch to a difffernt browser for viewing your files locally. Visitors to your site will not have this problem.

Javascripts should be placed right ahead of your </body> tag.

coothead
11-02-2012, 12:17 PM
Hi there omb2012,

...Internet Explorer saying its blocking scripts/activex...
This only happens locally.
To effect a cure for the page add this snippet of code directly after the DOCTYPE...


<!-- saved from url=(0014)about:internet -->

To permanently disable this information do this...

open IE.
click 'Tools'.
click 'Internet Options'.
click 'Advanced' tab.
scroll down to 'Security'.
check 'Allow active content to run in files on My Computer'.
click 'Apply'.
click 'OK'
have a beer. ;)

Further reading:-

http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx

coothead



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum