Jump to content

JS wont run local


dadimp_won

Recommended Posts

IE 9, Windows 7 == I am trying to get started in Java Script for personal use. HTML runs fine but Java Script is ignored as the offline level. The book I am using said "<script Language="JavaScript">"' W3 used "<script type = "text/javascript"> I assume that either should work. However both are ignored. I then copied a w3 try it sample using the copy/paste commands so there should be no typo errors. Same Result. Tried a different w3 sample with the same result. Both were simple ones using script to display a one-line message. Again the html works fine but the script is ignored. Must be something i am missing -- but cant figure what. Have no web page so cant tell if they would fail there also. IE works fine across all pages i have visited. The copied try it samples worked fine on the w3 page. Would appreciate any thots or suggestions.

Link to comment
Share on other sites

Here is the code"<html><body><h1>My First Web Page</h1><script type="text/javascript">document.write("<p>" + "Mike" + "</p>");</script></body></html>Copied directly from w3 sample. When it didnt work I changed the original date function to "Mike" thinking thatpossibly the date function was fouling it up. No luck -- the html H1 works but the script is ignored.

Link to comment
Share on other sites

It works for me in Firefox. Internet Explorer first asks me whether I'd like to execute local scripts or not, but then it works. Your browser settings may have told it to ignore all local scripts.

Link to comment
Share on other sites

Which browser are you using? I tested this and it works fine! Try simple javascript without document.write <html><body><h1>My First Web Page</h1><script type="text/javascript">alert("mike");</script></body></html> if alert appears we know js is enabled, and working, and so original script should work also.

Link to comment
Share on other sites

First to dsonesuk: Your code did not work for me : Appreciate the try and any more ideas you might have. To Ingolme: Your Idea is probably right. I found several references to scriipt in IE Security Settings which I changed.I must not have found the right one. Could u be a bit more specific on which one worked for you. I get no prompts. It just doesnt work!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...