Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    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".

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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...)

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    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".

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    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/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,542
    Thanks
    77
    Thanked 4,382 Times in 4,347 Posts
    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.

  • #7
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,017
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    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.

  • #8
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,702
    Thanks
    0
    Thanked 233 Times in 228 Posts
    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...
    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:-

    coothead


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •