Bonjour,
je veux réaliser une application qui permet d'ajouter des évènements dans un calendrier .
ces évènements seront ensuite enregistrés dans ma base de données et seront chargés/affiché une fois que l'on clique sur un jour j .

j'ai crée ma base avec phpmyadmin .

j'ai utliser , datepicker pour le calendrier .

ma question :
comment depuis mon javascript je pourrais ajouter un apel ajax qui appellera un php qui lui est va sauvegarder les données saisies

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
this.addAgendaItem = function(calId,title,startDate,endDate,allDay,data,displayProp){
			if(calId != null && title != null && startDate != null && endDate != null && allDay != null){
				// make sure start date comes before end date
				if(DateUtil.secondsDifferenceDirection(startDate,endDate) < 0){
					alert("Sorry, you can't create an event that ends before it starts");
					return;
				}
				calId = stripNumberSign(calId);
				var hashData = new Hashtable();
				if(data != null){
					for(var key in data){
						hashData.put(key,data[key]);
					}
				}
				var agi = new CalendarAgendaItem(title,startDate,endDate,allDay,hashData);
				if(displayProp != null){
					if(displayProp.backgroundColor != null){
						agi.setBackgroundColor(displayProp.backgroundColor);
					}
					if(displayProp.foregroundColor != null){
						agi.setForegroundColor(displayProp.foregroundColor);
					}
				}
				var calObj = myCalendars.get(calId);
				calObj.addAgendaItem(agi);		
			}
		};