Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: Stopping IE from blocking JScript execution

  1. #1

    Question Stopping IE from blocking JScript execution

    The newest versions of Internet Explorer have a nasty habit of blocking the activation/execution of JavaScripts on pages when they load. Since IE doesn't indicate anything other than a warning message saying to the effect that it could be dangerous to allow ActiveX or scripts to run and would you like to allow them to run, I'm afraid most people will decide to block the script's execution or just plain leave the site because they fear it might be trying to download a virus or malware to their machine.

    I just have an ad banner on the right-side of my page with a JavaScript ad rotator script so that each page visit or refresh will randomly display a different image (ad) with a link to that ad's website/web page.

    Is there some kind of script code I can add to the page that will tell a user's IE that "it's okay to let this script run, it's harmless"? I went the JavaScript route because the page is a static HTML page (not an ASP/ASPx or PHP page). I don't have this problem when I launch the page in Firefox. I've left my copy of Internet Explorer with the default settings intact, which is what I assume most users will be browsing the page with. If it doesn't work for me, then most likely 95%+ of visitors to this page will run into the same problem - which is a problem for me!

    Any suggestions or links to places that might have the answer?
    ~Mark G.
    Graphic Designer - Endoscopy Support Services, Inc.

  2. #2
    WebProWorld MVP DaveSawers's Avatar
    Join Date
    Dec 2006
    Location
    Lunenburg, Nova Scotia, Canada
    Posts
    760

    Re: Stopping IE from blocking JScript execution

    Since the use of Javascript is a feature that can be turned on or off in browsers, websites should always have a way of degrading gracefully if Javascript is turned off.

    Your rotating ad feature is best provided with server side scripting (PHP for example) which would choose the ad before the HTML is downloaded to the page. That way Javascript isn't required.

    Having Javascript turned on is not a big security risk and provides many useful functions on web sites. As long as Javascript is denied access to the clipboard, there's not a lot it can do to infect your PC with a virus.

    Microsoft is being somewhat disingenuous by lumping Javascript in with ActiveX controls and implying they can be equally dangerous.
    Dynamic Software Development
    www.activeminds.ca

  3. #3
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138

    Re: Stopping IE from blocking JScript execution

    Generally speaking, IE won't shouldn't stop most Javascript code from executing, unless it is doing something unusual that might be seen as XSS. Is there a page that you could post where we can see exactly what is getting blocked?

    Of course, as Dave says above, more and more users seem to be disabling Javascript, for several reasons; to disable ads, to prevent certain XSS issues, etc. A server side solution would probably give you the most consistent results. Even if the page is static, you could have the ad area point to a dynamic script that selects the ad to be displayed.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  4. #4

    Smile Re: Stopping IE from blocking JScript execution

    Quote Originally Posted by wige View Post
    ... Of course, as Dave says above, more and more users seem to be disabling Javascript, for several reasons; to disable ads, to prevent certain XSS issues, etc. A server side solution would probably give you the most consistent results. Even if the page is static, you could have the ad area point to a dynamic script that selects the ad to be displayed.
    Since I am not a programmer and have no idea whatsoever on how to create and deploy a PHP or ASP version of the rotating ad, do any of you know of a very "user-friendly", cut-and-paste code I could use? ASP would be better (our current web hosting server doesn't have PHP, only ASP) but if there's a simple, and free (the JavaScript ad rotator was a free script), PHP out there then posting a link would be most appreciated.
    ~Mark G.
    Graphic Designer - Endoscopy Support Services, Inc.

Similar Threads

  1. Stopping web form spam
    By discusgroup in forum Internet Security Discussion Forum
    Replies: 7
    Last Post: 10-29-2008, 11:50 AM
  2. What is stopping search engines seeing my content?
    By kristy7 in forum Search Engine Optimization Forum
    Replies: 9
    Last Post: 02-02-2008, 10:22 PM
  3. V ticker PHP to jscript help pls
    By freehits in forum Web Programming Discussion Forum
    Replies: 4
    Last Post: 08-24-2005, 02:16 PM
  4. Stopping Porno Spammers...
    By TN Todd in forum Internet Industry
    Replies: 1
    Last Post: 10-03-2004, 10:08 PM
  5. accessing external variables in a jscript
    By kingman in forum Web Programming Discussion Forum
    Replies: 0
    Last Post: 02-25-2004, 09:53 PM

Posting Permissions

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