can anyone find my extra > ?

  mco 19:22 06 Jan 2006
Locked

I copied and pasted a date onto a site I'm in the middle of building, but somewhere along the line I seem to have acquired an extra > at the beginning...
click here

I've tried looking at the code but I can't see where it is - can any code readers point me in the right direction please?

  Taran 19:52 06 Jan 2006

It's in a block of JavaScript:

/*Current date script credit:
JavaScript Kit (click here)
Over 200+ free scripts here!
*/

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("><small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")

</script>

You need to change that last document.write line and delete the > just after the bracket and quote mark, like this:

From

document.write("><small> etc,etc..

to

document.write("<small> etc,etc..

The rogue tag is just before the opening <small> tag.

T

  Taran 19:53 06 Jan 2006

Just after the month array line:

var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

Sorry - should have perhaps beena little clearer.

  mco 20:10 06 Jan 2006

great! Will do asap.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 Hack Latest News: How Secure is your Wi-Fi?

Photoshop CC 2018 released with new Curvature Pen and better brush tools

Best kids apps for iPhone & iPad

Comment utiliser Twitter ?