Actualiser

bonjour les amis.
j ai une page d accueil de mon site, et je veux qd je clic sur vote , la page d accueil s'actualiser , pour enregistrer le resultat.
et merci bcp.

5 réponses

  1. Contributeur
    Salut,

    Est-ce que tu pourrais nous copier ton code ici ? Ca nous aiderait bien à comprendre déjà comment fonctionne ton fichier ;)

    @+
    0
    1. salut
      en fait je veux actualiser une partie de ma page je trouve que c mieu.
      j ai fait un system de vote dans ma page, et je veux que seulment la partie qui contient le vote soit actualiser.
      j ai 3 fichier php:
      sondage.php ; config_sondage.php ; resultat.php
      et merci d avance ;)
      0
      1. insert ca dans la balise de ton bouton mais l rafraichira toutes la page

        onClick="javascript:Create_SLA.submit();"
        0
        1. merci bcp pour ton aide mon ami
          mais ca marche pa ton code.
          voila mon fichier config_sondage:
          function form_vote(){
          global $vote1,$vote2;
          if (@$_COOKIE["cookie"] == '2')

          {
          //echo "<form name=\"voter\" method=\"get\" action=\"cookie.htm\">\n";
          echo "<p>\n";
          echo "<input type=\"radio\" name=\"choix\" value=\"1\" />\n";
          echo "<strong>$vote1</strong>\n";
          echo "<input type=\"radio\" name=\"choix\" value=\"2\" />\n";
          echo "<strong>$vote2</strong>\n";
          echo "<input type=\"hidden\" name=\"form\" value=\"envoi\" />\n";
          echo "<a href=\"#\" onClick=\"window.open('popup.php?n=1','','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=0, height=0, left=1, top=1');return(false)\">;<input name=\"vote\" type=\"button\" value=\"Vote\"></a>\n";

          echo "<p><strong><a href=\"#\" onClick=\"window.open('resultats_sondage.php','','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=0, height=0, left=1, top=1');return(false)\"><font color=\"#000000\" size=\"4\">Resultat</font></a>\n";
          //echo "<font color=\"#000000\">Résultat</font></a></strong>\n";
          echo "</p>\n";
          echo "</form>\n";

          }

          else{
          echo "<form name=\"voter\" method=\"post\" action=\"sondage.php\">\n";
          echo "<p>\n";
          echo "<input type=\"radio\" name=\"choix\" value=\"1\" />\n";
          echo "<strong>$vote1</strong>\n";
          echo "<input type=\"radio\" name=\"choix\" value=\"2\" />\n";
          echo "<strong>$vote2</strong>\n";

          echo "<input type=\"hidden\" name=\"form\" value=\"envoi\" />\n";
          echo "<p><input type=\"submit\" name=\"vote\" value=\"Voter\" class=\"bouton\" /></p>\n";

          echo "<p><strong><a href=\"#\" onClick=\"window.open('resultats_sondage.php','','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=0, height=0, left=1, top=1');return(false)\"><font color=\"#000000\" size=\"4\">Resultat</font></a>\n";
          //echo "<font color=\"#000000\">Résultat</font></a></strong>\n";
          echo "</p>\n";
          echo "</form>\n";

          }}
          /////////////////

          ou je peu intergé ton code.
          et merci bcp de votre aide
          0
          1. merci pour tou.
            voici mon msn si tu veu m aidé en parallel
            adilinho_1@hotmail.com
            0