Page 1 sur 1

afficher formulaire html grâce à ajax

Posté : 30 janv. 2014, 15:19
par maxime.m
Bonjour, mon problème est que je souhaite afficher un formulaire html par le biais d'ajax en utilisant comme condition d'affichage un checkbox.

Voici mon formulaire html :
<input onclick="afficher_form();" type="checkbox" id="check" value="1">Afficher estimation de revenus</input>
<tr>
      <td colspan="6"><h2>Estimation revenus CA </h2></td>
</tr>
<tr>
      <td>Année de début</td>
      <td><input   maxlength="4" name="annee_debut" id="annee_debut" type="text" style="width:75px; height:15px; text-align:center;" value=""></td>
      <td>Année de fin</td>
      <td><input   maxlength="4" name="annee_fin" id="annee_fin" type="text" style="width:75px; height:15px; text-align:center;" value=""></td>
</tr>
<tr>
      <th colspan="9"><input type="submit" name="Validez" value="Calculer" ></th>
</tr>

Re: afficher formulaire html grâce à ajax

Posté : 30 janv. 2014, 23:15
par moogli
salut,

le but c'est d'afficher les dexu champs texte ?

Si oui un simple bout de JS qui passe la css de display none à display block suffit.
Si tu utilise un framework javascript il y a des raccourcis pour t'aider facilement.

dernière chose : la mise en forme avec des tableaux c'est le mal : http://www.alsacreations.com/tuto/lire/ ... leaux.html (article de 2005 ...)


@+

Re: afficher formulaire html grâce à ajax

Posté : 31 janv. 2014, 10:21
par maxime.m
Merki moogli