[Pro] Help with custom script

Hi there,
I need to incorporate the following script on a website I’m making but have no idea how and were to put it. I thought it would work with inserting mark up to an element but it just shows the code and not the result. I can’t find a tutorial on the subject so any help would be much appreciated.
below is the code:
< script language = “JavaScript” >

var miuebung = " "

function doOut(today) {
    var dayofweek = today.getDay();
    document.writeln(daystr = Wochentag[today.getDay()] + " " + today.getDate() + "." + (today.getMonth() + 1) + "." + (today.getYear() < 1000 ? today.getYear() + 1900 : today.getYear()) + "<br>");
    if (dayofweek == 0) document.writeln("<b>" + souebung + "</b><br>");
    else {
        day = dayofweek
        weekoffset = Math.floor((today.getTime() / (1000 * 60 * 60 * 24) - 3) / 7) % 53
        index = (weekoffset * 6 + day) % uebungen.length
        document.writeln("<b>" + uebungen[index] + "</b><br>");
        if (day == 3) document.writeln("<b>" + miuebung + "</b><br>");
    }
}

//for (i=1;i<100;i++) doOut(new Date(2006,0,i))
doOut(new Date());

// →

Thanks,
Nicolet


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

See http://freewaytalk.net/thread/view/135003

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Note that this is not a legal comment inside of JavaScript. JS comments begin with // for the one-line variant, and are /* many lines */ for the multi-line variant. This is an HTML comment, and is entirely ignored inside of a block of JavaScript.

Walter

On Nov 10, 2013, at 8:05 AM, Nicolet Schouten wrote:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options