chazzledazzle
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by chazzledazzle
-
-
Hello all,I am very new to JavaScript, and I am trying to get a page to include today's date, as well as a countdown to a specific date. For today's date, I am using:
<script language = "javascript" type="text/javascript"><!--today = new DateweekDayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")function printDate(){document.write("<b>" + weekDayName[today.getDay()]+ ", " + monthName[today.getMonth()] + " " + today.getDate()+ "</b>")}--></script>
The problem is that I am using a WYSIWYG editor that does not like the 'document.write' script. It says that 'if I do not remove the offending code (their words), then IE will crash.' As a workaround, I am trying to put the code into a js doc, and call it up with a <div> tag, as instructed by the tech help, but it isn't working. Does anyone know how to do this? I might have left out pertinent pieces. Any and all help is truly, truly appreciated. Thanks!
document.write workaround help
in JavaScript
Posted
Jesh,Thanks for your reply. Unfortunately, the editor doesn't recognize it, and there is no output. Sad. What I am going to have to figure out is:1. The exact script to put into the js doc.2. The div call, which i think i have.3. How to make this easier in the future.Here is the issue I am working with:I am using (read 'have to use') a web based WYSIWYG editor, that essentially breaks a page up into components...
I am not the most skilled programmer, so this is a bit of a challenge for me. Just starting out with O'Reilly's JavaScript book (not the 5th edition either, sadly).