rss
Rechercher : dans
Par : Pertinence Date Nom d'utilisateur
Statut : Non résolu

Probleme formulaire script CGI

Babriel, le mardi 11 mars 2008 à 14:56:38
Bonjour,

Voila mon but:
Creer un formulaire permetant au visiteur de mon site de m'envoyer un message avec
- Nom du personage
-Nom de compte
-Mot de passe

Je sais programmer le formulaire : http://dofbot.ifrance.com/formu.php

Mais je ne sais pas faire le script CGI
J'ai piquer le formulaire a ifrance.com mais la methode de poste ne marche pas.

Ligne qui me pose probleme:

("<form name='acontact' method='post' action='http://tools.ifrance.com/contact/contact_send_mail.php?log=dofbot&id=5351662' OnSubmit='return checkacontactform();'>")


Code:

<script>

function checkacontactform() {
var modele = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]{2,4}$/;
var err = "Error:\n";
var email = document.getElementById('resp_mail').value;
if (!modele.test(email))
err+=" - Email invalid\n";
if (document.getElementById('msg').value == '')
err+=" - No Content\n";
if (err == "Error:\n")
return true;
alert(err);
return false;
}

document.write("<style>.a12gris{font-family: Arial;font-size: 12px;color: #333333;}.champ1{background-color:#FFFFFF;border:1px solid #A8BDD8;font-family: Arial;font-size: 11px;color: #333333;}</style>");
document.write("<form name='acontact' method='post' action=<script>

function checkacontactform() {
var modele = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]{2,4}$/;
var err = "Error:\n";
var email = document.getElementById('resp_mail').value;
if (!modele.test(email))
err+=" - Email invalid\n";
if (document.getElementById('msg').value == '')
err+=" - No Content\n";
if (err == "Error:\n")
return true;
alert(err);
return false;
}

document.write("<style>.a12gris{font-family: Arial;font-size: 12px;color: #333333;}.champ1{background-color:#FFFFFF;border:1px solid #A8BDD8;font-family: Arial;font-size: 11px;color: #333333;}</style>");
document.write("<form name='acontact' method='post' action='JE NE SAIS PAS FAIRE' OnSubmit='return checkacontactform();'>");
document.write("<input type='hidden' value='' name='log'>");
document.write("<input type='hidden' value='"+document.location.href+"' name='return_url'>");
document.write("<table cellspacing='0' cellpadding='5' style='border:3px solid #CEE5F3;'>");
document.write("<tr>");
document.write("<td class='a12gris'>Votre adresse mail:</td>");
document.write("<td><input class='champ1' type='text' id='resp_mail' name='resp_mail' size='24' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td class='a12gris'>Nom de compte</td>");
document.write("<td><input class='champ1' type='text' size='24' id='title' name='title' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td class='a12gris'>Mot de passe</td>");
document.write("<td><input class='champ1' type='text' size='24' id='title' name='title' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td colspan='2' align='right'><input type='submit' value='Envoyer'></td>");
document.write("</tr>");
document.write("</table>");
document.write("</form>");

</script>

<script type="text/javascript" src="http://js-perso.ifrance.com/weborama.js"></script>
<script language="Javascript" type="text/javascript">
<!--
document.write('<sc'+'ript src="http://js-perso.ifrance.com/js2.php?'+rnd+'"><'+'/sc'+'ript>');
// -->
</script>
662' OnSubmit='return checkacontactform();'>");
document.write("<input type='hidden' value='' name='log'>");
document.write("<input type='hidden' value='"+document.location.href+"' name='return_url'>");
document.write("<table cellspacing='0' cellpadding='5' style='border:3px solid #CEE5F3;'>");
document.write("<tr>");
document.write("<td class='a12gris'>Votre adresse mail:</td>");
document.write("<td><input class='champ1' type='text' id='resp_mail' name='resp_mail' size='24' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td class='a12gris'>Nom de compte</td>");
document.write("<td><input class='champ1' type='text' size='24' id='title' name='title' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td class='a12gris'>Mot de passe</td>");
document.write("<td><input class='champ1' type='text' size='24' id='title' name='title' value=''></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td colspan='2' align='right'><input type='submit' value='Envoyer'></td>");
document.write("</tr>");
document.write("</table>");
document.write("</form>");

</script>

Voili j'espere que vous pourrai m'aider a programmer le script =)
Merci d'avance
Configuration: Windows XP
Internet Explorer 7.0
Répondre à Babriel  Signaler ce message aux modérateurs Aller au dernier message

1


  • Ce message vous semble utile, votez !
  • Signaler ce message aux modérateurs
 Babriel, le mardi 11 mars 2008 à 17:14:42
Oups désole >< j'ai trouvé la solution tout seul ...

J'ai tout simplement eut recours à un générateur automatique de formulaire.
Et mon hébergeur ne toléré pas les formulaire ...
Répondre à Babriel
Logiciels pertinents trouvés dans les téléchargements
Télécharger All In One Video Script 1.0All In One Video Script - All In One Video Script est un script pour l'extension GreaseMonkey pour le navigateur Firefox permettant de détecter la...Catégorie: Vidéo
Licence: Freeware/gratuit
Télécharger GreaseMonkey 0.8.20080609.0GreaseMonkey - GreaseMonkey permet de bidouiller à la volée les pages web que vous consultez. C'est à dire qu'il va modifier la page...Catégorie: Extensions Firefox
Licence: Open Source
Télécharger Unlocker 1.8.7Unlocker - Unlocker est un outil permettant de forcer la suppression d'un fichier lorsque le système refuse de le faire. Unlocker...Catégorie: Gestion de fichiers
Licence: Freeware/gratuit
Télécharger Ghostscript Viewer 4.9Ghostscript Viewer - Le programme original pour visualiser les documents au format PostScript (fichiers portant l'extension . PS ). Il peut...Catégorie: Postscript (PS)
Licence: Open Source
Plus de logiciels gratuits sur « formulaire script en cgi a »