samedi 15 novembre 2014

insert values in calendar and date-search function


Vote count:

0




Thanks for looking at my problem. What I need is a calendar, in which you can insert a certain value (like a birthday, vacation, dentist appointment etc.) to a certain date. I made this simple table changed the appearance of the weekend. I thought I'd use an array system to add the values but I don't know how to get every single date bound to a separate array.


It also needs a search function with which you can search a date, and it will focus on it, and I don't even know how to get that started.


On start up it has to focus on the current date, and it needs multiple months, but I think I can get that done. My biggest problem is a working array system (or another method ) and a search function. And again, thanks a lot for looking into my problem.



<html>
<head>
<script>

// geef elke cell een igen ID en maak de array uniek aan die cell.
// Makes a function to add birthdays, vacation etc to a date
var cell = [];

function add(){
var invoer = window.prompt("Voer hier de tekst in die u wenst toe te voegen aan deze datum. Als u deze datum wil bekijken, voert u 'bekijk' in.");

if(invoer != "bekijk"){
cell[cell.length] = invoer
}

if(invoer == "bekijk"){
alert(cell)
}


}
</script>
</head>
<body>
<table border="2">
<tr>
<th colspan="7">January 2014</th>
</tr>
<tr>
<th>Ma</th>
<th>Di</th>
<th>Wo</th>
<th>Do</th>
<th>Vr</th>
<th bgcolor = cyan>Za</th>
<th bgcolor = cyan>Zo</th>
</tr>
<tr>
<td onclick = add()>1</td>
<td onclick = add()>2</td>
<td onclick = add()>3</td>
<td onclick = add()>4</td>
<td onclick = add()>5</td>
<td onclick = add() bgcolor = cyan>6</td>
<td onclick = add() bgcolor = cyan>7</td>
</tr>
<tr>
<td onclick = add()>8</td>
<td onclick = add()>9</td>
<td onclick = add()>10</td>
<td onclick = add()>11</td>
<td onclick = add()>12</td>
<td onclick = add() bgcolor = cyan>13</td>
<td onclick = add() bgcolor = cyan>14</td>
</tr>
<tr>
<td onclick = add()>15</td>
<td onclick = add()>16</td>
<td onclick = add()>17</td>
<td onclick = add()>18</td>
<td onclick = add()>19</td>
<td onclick = add() bgcolor = cyan>20</td>
<td onclick = add() bgcolor = cyan>21</td>
</tr>
<tr>
<td onclick = add()>22</td>
<td onclick = add()>23</td>
<td onclick = add()>24</td>
<td onclick = add()>25</td>
<td onclick = add()>26</td>
<td onclick = add() bgcolor = cyan>27</td>
<td onclick = add() bgcolor = cyan>28</td>
</tr>
<tr>
<td onclick = add()>29</td>
<td onclick = add()>30</td>
<td onclick = add()>31</td>
</table>
</body>
</html>


asked 32 secs ago







insert values in calendar and date-search function

Aucun commentaire:

Enregistrer un commentaire