Hi All,
I have created an events calendar using HTML tables. I added a small javascript to it so that when a person clicks on a date, the results show up in a textarea box. The problem I am having is that the results are displaying on one line, and I would like to break the line so that the date could be on one line and the event on the next. Does anyone know how to insert a line break in an array, or would i have to do it another way?
here is the array and function:
dayEvent= new Array
dayEvent[2] = “9/2 – Zoo Trip – Event Sponsor”
dayEvent[6] = “9/6 – Gold Star – Event Sponsor”
dayEvent[7] = “9/7 – Autumn Festival – Event Sponsor”
dayEvent[11] = “9/11 – Gold Star – Event Sponsor”
function showDate(thisDay)
{
document.Calendar.dateInfo.value = dayEvent[thisDay]
}
The table calls the function in an “href”:
<table>
<tr>
<td><a href=”javascript:showDate(2)”>2</a></td>
</tr>
</table>
Can I replace the dashes in the array elements with a line break? I’d like each on a new line. If so, what is the syntax?
THANKS!! 😮