I'm having trouble running javascript. I have a Dell Dimension 300 system.

The code I have in my "htm" document is:

<td id="daycell">

<script language="javascript">
<! -- Hides from non-JavaScript browsers
document.write("Today is 12/15/2005<br>");
document.write("only 10 days until Christmas");
// stop hiding -->

I tried it with "JavaScript" or "javascript".

The PC blockers come up. After I allow it from the msg, nothing happens. Is there any software I need to add on my system?



11 Years
Discussion Span
Last Post by tgreer

JavaScript run from a page loaded locally, will always give a "security warning" in Internet Explorer. Run the page from a server, or with FireFox, and you'll get no warning.

Invoking "document.write()" mid-page is tricky, in may in fact overwrite the current page. You also have no "document.close()".

I don't think you have any configuration problems, just inexperience with JavaScript.



This script is from a assignment in the book I am studying for our class. The "HTML" book discusses the subject, then has you insert the javascript commands in a designated area of the html page. The book discusses the script working without the "document.close" statement.

For testing, I'm running it from my memory stick ("F" drive). All the other assignments, including my project and case studies have worked fine without any problem.

What is "FireFox"? Is it expensive?

Thanks for your help:)


Thanks for your help.

I downloaded Firefox, and was able to detect that the "JavaScript" errored off with thr above Comment line. I moved it above the <script> tag and it worked.

Again Thanks,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.