Computer Hope

Software => Internet browsers => Topic started by: BarryP on November 30, 2013, 03:19:15 PM

Title: Enabling Javascript in my web browser
Post by: BarryP 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
Title: Re: Enabling Javascript in my web browser
Post by: DaveLembke 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 (http://stackoverflow.com/questions/8734372/difference-between-script-type-and-script-language-declarations)
Title: Re: Enabling Javascript in my web browser
Post by: BarryP 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
Title: Re: Enabling Javascript in my web browser
Post by: DaveLembke 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.