Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Enabling Javascript in my web browser  (Read 4388 times)

0 Members and 1 Guest are viewing this topic.

BarryP

    Topic Starter


    Greenhorn

    • Experience: Experienced
    • OS: Windows 7
    Enabling Javascript in my web browser
    « on: November 30, 2013, 03:19:15 PM »
    Hello,

     

    Can someone please tell me how to enable Javascript in my browsers  (IE 10 and FIrefox 25.01).  I used this simple first code:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
     

    <head>

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <title>Untitled 1</title>

    </head>


    <body>

    <script language="javascript">

     
    alert{"Aliens Attacking"};

    </script>

    This is my text

    </body>
     

    My Alert box does not display and I get a message saying  Internet Explorer has restricted running scripts or active X controls on this page. I went to Internet Options and enabled Scripting to be allowed but it doesn’t work.   Can someone please help me here?

     Thank you in advance for your reply.

     Barry

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Enabling Javascript in my web browser
    « Reply #1 on: November 30, 2013, 03:50:13 PM »
    I think your running into a depreciated syntax issue with modern browsers using <script language="JavaScript"> ... try using <script type="text/javascript"> or <script> instead.

    http://stackoverflow.com/questions/8734372/difference-between-script-type-and-script-language-declarations

    BarryP

      Topic Starter


      Greenhorn

      • Experience: Experienced
      • OS: Windows 7
      Re: Enabling Javascript in my web browser
      « Reply #2 on: December 01, 2013, 05:39:42 AM »
      Thank you Dave for taking the time to answer my question. What I found (finally), was that it was the result of a checkbox not being checked in the Advanced tab of Internet Options under Security- "Allow content to be run from My Files". Your response was most appreciated.  Barry

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Enabling Javascript in my web browser
      « Reply #3 on: December 03, 2013, 03:04:39 PM »
      Glad you got it resolved and thanks for reporting the fix in case anyone else runs into a similar problem.