Variables non transmises depuis l'event scroll
Bonjour
J'ai retourné le problème dans tous les sens, et je ne pige pas l'anomalie.
Depuis l'event "scroll" de mon datechooser, j'envoie des variables via HTTPService.
Code:
1 2 3 4 5 6 7
| <mx:HTTPService id="moisRequete" url="php/mois.php" useProxy="false" method="POST">
<mx:request xmlns="">
<c_day>{c_day.text}</c_day>
<c_month>{c_month.text}</c_month>
<c_year>{c_year.text}</c_year>
</mx:request>
</mx:HTTPService> |
Fichier mois.php (test de récupération)
Qui au demeurant, ne récupére aucunes variables.(?)
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <?php
header('Content-Type: text/html; charset=utf-8');
$c_day = ($_POST['$c_day']);
$c_month = ($_POST['$c_month;']);
$c_year = ($_POST['$c_year']);
print"</date>\n";
print"<jour>$c_day</jour><mois>$c_month</mois><an>$c_year</an>";
print"</date>\n";
?> |
Mon Datechooser :
Code:
1 2 3 4
| <mx:DateChooser id="ChoixUser" allowMultipleSelection="true"
//...
//...
change="getDate(event)" scroll="onChangeMois(event);" /> |
Si je fais un test comme suit :
AS3 :
Code:
1 2 3 4 5 6 7 8 9 10 11
| private function onChangeMois(evt:DateChooserEvent):void {
var c_day:int=int(1); //Variable figée
var c_year:int=int(ChoixUser.displayedYear);
var c_month:int=int(ChoixUser.displayedMonth+1);
// Test des variables
Alert.show(c_year+"-"+c_month+"-"+c_day);
// Envoi de ma requête HTTPService
moisRequete.send();
} |
Mes variables sont bien interprêtées dans l'Alert, et à chaque changement de mois ou année.
Et pourtant, rien n'est envoyé via HTTPservice.
Si je fai un log du fichier mois.php, aprés l'envoi de mes variables, elles sont inexistantes.
En résumé, les variables sont bien interprêtées dans l'application mais ne sont pas envoyées via ma requête HTTPService.
Et là, franchement, je cale. 8O
Peut-être une idée ?
Merci à vous