![]() |
| ||
| Having trouble running javascript Hi, 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 --> </script> </td> 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? Thanks, Bob |
| ||
| Re: Having trouble running javascript 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. |
| ||
| Re: Having trouble running javascript Thanks, 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:) |
| ||
| Re: Having trouble running javascript Firefox is an alternative browser. It's free. If you're writing/testing code on your local system, then I recommend it. It has a built-in JavaScript debugger, for example. You can get it here: http://www.mozilla.org/products/firefox/ |
| ||
| Re: Having trouble running javascript 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, |
| ||
| Re: Having trouble running javascript Oh good. I should have caught that, but glad I could help at least indirectly. |
| All times are GMT -4. The time now is 3:57 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC