Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-01-2012, 09:47 PM   PM User | #1
omb2012
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
omb2012 is an unknown quantity at this point
Question Javascript Blocked In IE

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
omb2012 is offline   Reply With Quote
Old 11-01-2012, 09:54 PM   PM User | #2
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 952
Thanks: 7
Thanked 98 Times in 98 Posts
WolfShade is an unknown quantity at this point
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:.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 11-01-2012, 09:56 PM   PM User | #3
omb2012
New to the CF scene

 
Join Date: Oct 2012
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
omb2012 is an unknown quantity at this point
Quote:
Originally Posted by WolfShade View Post
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...)
omb2012 is offline   Reply With Quote
Old 11-01-2012, 09:58 PM   PM User | #4
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 952
Thanks: 7
Thanked 98 Times in 98 Posts
WolfShade is an unknown quantity at this point
Viewing from your computer, you can use "http://localhost/index.html" or whatever the document name is. See if that makes a difference.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 11-01-2012, 10:11 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by WolfShade View Post
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 11-02-2012, 02:39 AM   PM User | #6
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,247
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 11-02-2012, 08:45 AM   PM User | #7
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,044
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 11-02-2012, 11:17 AM   PM User | #8
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,551
Thanks: 0
Thanked 195 Times in 191 Posts
coothead will become famous soon enough
Hi there omb2012,
Quote:
...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...
Code:

<!-- saved from url=(0014)about:internet --> 
To permanently disable this information do this...
  1. open IE.
  2. click 'Tools'.
  3. click 'Internet Options'.
  4. click 'Advanced' tab.
  5. scroll down to 'Security'.
  6. check 'Allow active content to run in files on My Computer'.
  7. click 'Apply'.
  8. click 'OK'
  9. have a beer.
Further reading:-
http://msdn.microsoft.com/en-us/libr...28(VS.85).aspx
coothead
coothead is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:45 AM.


Advertisement
Log in to turn off these ads.