Probleme avec le script de formulaire
2 participants
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1 • Partagez
Probleme avec le script de formulaire
Bonjour,
J'ai suivi le tuto de Sen Hime sur les Formulaires
J'ai reussi a la faire fonctionner (vu mon niveau pas sans mal) tout allais bien mais ce matin il ne fonctionne plus.
Quand je valide il me renvoie sur le page du poste et me dit que je dois entree un message avant de poster.
Je n'arrive pas a trouver où est l'erreur,
Voici le code:
Par avance merci de votre aide.
J'ai suivi le tuto de Sen Hime sur les Formulaires
J'ai reussi a la faire fonctionner (vu mon niveau pas sans mal) tout allais bien mais ce matin il ne fonctionne plus.
Quand je valide il me renvoie sur le page du poste et me dit que je dois entree un message avant de poster.
Je n'arrive pas a trouver où est l'erreur,
Voici le code:
- Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Formulaire d'affichage emploi pour forum</title>
</head>
<body>
<script type="text/javascript">function envoiMessage(form)
{
// Créer un message à partir des informations fournies
var txt_message = "[color=darkred][b]Titre du poste : [/b][/color] " + form.nom.value + '\n'
+ "[color=darkred][b]Référence : [/b][/color] " + form.ref.value + '\n'
+ "[color=darkred][b]Salaire : [/b][/color] " + form.prenom.value + '\n'
+ "[color=darkred][b]Lieu/Site : [/b][/color] " + form.lieu.value + '\n'
+ "[color=darkred][b]Période d'affichage : [/b][/color] " + form.affichage.value + '\n'
+ "[color=darkred][b]Statu : [/b][/color]\n ";
// Dans le cas des checkboxs, on va les parcourir pour prendre la valeur de celles qui sont cochées:
for(var i = 0; i < form.gouts.length; i++)
{
if(form.gouts[i].checked == true) { txt_message = txt_message + form.gouts[i].value + '\n'; }
}
txt_message = txt_message + "[color=darkred][b]Description : [/b][/color] " + form.plus.value + '\n' + "[color=darkred][b]Exigences : [/b][/color] " + form.exigence.value + '\n' + "[color=darkred][b]Lien : [/b][/color] " + form.source.value + '\n' ;
// Insère le texte construit dans le champ caché "message" du formulaire
form.message.value = txt_message;
}
</script>
<h1 style="color: rgb(0, 51, 0); text-decoration: underline;">Formulaire d'affichage d'emploi</h1>
<br>
<br>
<form action="http://toutpourlagent.forum-canada.com/posting.forum"
method="post" name="post" enctype="multipart/form-data"
onsubmit="envoiMessage(this)"> <input name="lt" value="0" type="hidden">
<input name="mode" value="newtopic" type="hidden">
<h4><!-- Un nouveau topic sera créé --><!-- Value 0: Sujet Normal (1 = Note / 2 = annonce) --><!-- Contiendra le texte du message --><!-- ID du forum dans lequel le message sera posté--><label
style="color: rgb(0, 102, 0);" for="titre">Titre du sujet :</label>
<input name="subject" id="titre" value="" size="45" maxlength="60" type="text"></h4>
<input name="topictype" value="0" checked="checked" type="hidden"> <input name="message" value="" type="hidden">
<input name="f" value="38" type="hidden"> <br>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="nom">Titre du poste: </label><input size="40" name="nom" id="nom"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="ref">Référence: </label> <input size="40" name="ref" id="ref"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="prenom">Salaire: </label> <input size="40" name="prenom" id="prenom"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="lieu">Lieu/Site: </label> <input size="40" name="lieu" id="lieu"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="affichage">Période<br>d'affichage: </label> <input value="*Fin obligatoire" size="40" name="affichage" id="affichage"></h4>
<br>
<div style="margin-left: 40px;"> </div>
<div style="margin-left: 40px;"> </div>
<h4><label style="color: rgb(0, 102, 0);">Statu: </label> <input name="gouts" id="plein" value="Temps plein" type="checkbox">
<label for="chocolat">Temps plein</label> <input name="gouts" id="partiel" value="Temps partiel" type="checkbox">
<label for="partiel"> Temps partiel</label> <input name="gouts" id="temp" value="Temporaire" type="checkbox">
<label for="chips">Temporaire</label> </h4>
<h4 style="color: rgb(0, 102, 0);"><label for="plus">Description: </label></h4>
<h4><textarea cols="45" rows="10" id="plus" name="plus"></textarea></h4>
<h4> </h4>
<h4 style="color: rgb(0, 102, 0);"><label for="exigence">Exigences: </label></h4>
<h4><textarea cols="45" rows="10" id="exigence" name="exigence"></textarea></h4>
<div style="text-align: center;"><br>
<div style="text-align: left;">
<h4><label style="color: rgb(0, 102, 0);" for="source">Lien: </label> <input value="http://" size="60" name="source" id="source"> </h4>
<div style="text-align: center;"><input name="post" value="Envoyer" type="submit"></div>
</div>
</div>
</form>
</body>
</html>
Par avance merci de votre aide.
Re: Probleme avec le script de formulaire
bonsoir,
- Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Formulaire d'affichage emploi pour forum</title>
</head>
<body>
<script type="text/javascript">
function envoiMessage(form)
{
// Créer un message à partir des informations fournies
var txt_message = "[color=darkred][b]Titre du poste : [/b][/color] " + form.nom.value + '\n'
+ "[color=darkred][b]Référence : [/b][/color] " + form.ref.value + '\n'
+ "[color=darkred][b]Salaire : [/b][/color] " + form.prenom.value + '\n'
+ "[color=darkred][b]Lieu/Site : [/b][/color] " + form.lieu.value + '\n'
+ "[color=darkred][b]Période d'affichage : [/b][/color] " + form.affichage.value + '\n'
+ "[color=darkred][b]Statu : [/b][/color]\n ";
// Dans le cas des checkboxs, on va les parcourir pour prendre la valeur de celles qui sont cochées:
for(var i = 0; i < form.gouts.length; i++)
{
if(form.gouts[i].checked == true) { txt_message = txt_message + form.gouts[i].value + '\n'; }
}
txt_message = txt_message + "[color=darkred][b]Description : [/b][/color] " + form.plus.value + '\n'
+ "[color=darkred][b]Exigences : [/b][/color] " + form.exigence.value + '\n'
+ "[color=darkred][b]Lien : [/b][/color] " + form.source.value + '\n' ;
// Insère le texte construit dans le champ caché "message" du formulaire
form.message.value = txt_message;
}
</script>
<h1 style="color: rgb(0, 51, 0); text-decoration: underline;">Formulaire d'affichage d'emploi</h1>
<br>
<br>
<form action="http://toutpourlagent.forum-canada.com/posting.forum" method="post" name="post" enctype="multipart/form-data" onsubmit="envoiMessage(this)">
<input name="lt" value="0" type="hidden">
<input name="mode" value="newtopic" type="hidden"><!-- Un nouveau topic sera créé -->
<input name="topictype" value="0" checked="checked" type="hidden"> <!-- Value 0: Sujet Normal (1 = Note / 2 = annonce) -->
<input name="message" value="" type="hidden"><!-- Contiendra le texte du message -->
<input name="f" value="38" type="hidden"><!-- ID du forum dans lequel le message sera posté-->
<h4><label style="color: rgb(0, 102, 0);" for="titre">Titre du sujet :</label>
<input name="subject" id="titre" value="" size="45" maxlength="60" type="text"></h4> <br>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="nom">Titre du poste: </label>
<input size="40" name="nom" id="nom"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="ref">Référence: </label>
<input size="40" name="ref" id="ref"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="prenom">Salaire: </label>
<input size="40" name="prenom" id="prenom"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="lieu">Lieu/Site: </label>
<input size="40" name="lieu" id="lieu"></h4>
<br>
<h4><label style="color: rgb(0, 102, 0);" for="affichage">Période<br>d'affichage: </label>
<input value="*Fin obligatoire" size="40" name="affichage" id="affichage"></h4>
<br>
<div style="margin-left: 40px;"> </div>
<div style="margin-left: 40px;"> </div>
<h4><label style="color: rgb(0, 102, 0);">Statu: </label> <input name="gouts" id="plein" value="Temps plein" type="checkbox">
<label for="chocolat">Temps plein</label> <input name="gouts" id="partiel" value="Temps partiel" type="checkbox">
<label for="partiel"> Temps partiel</label> <input name="gouts" id="temp" value="Temporaire" type="checkbox">
<label for="chips">Temporaire</label> </h4>
<h4 style="color: rgb(0, 102, 0);"><label for="plus">Description: </label></h4>
<h4><textarea cols="45" rows="10" id="plus" name="plus"></textarea></h4>
<h4> </h4>
<h4 style="color: rgb(0, 102, 0);"><label for="exigence">Exigences: </label></h4>
<h4><textarea cols="45" rows="10" id="exigence" name="exigence"></textarea></h4>
<div style="text-align: center;"><br>
<div style="text-align: left;">
<h4><label style="color: rgb(0, 102, 0);" for="source">Lien: </label> <input value="http://" size="60" name="source" id="source"> </h4>
<div style="text-align: center;"><input name="post" value="Envoyer" type="submit"></div>
</div>
</div>
</form>
</body>
</html>
Re: Probleme avec le script de formulaire
Super!! Un gros merci.
Re: Probleme avec le script de formulaire
Donc sujet resolut
Sujets similaires
» Problème avec un script (js) qui remplace le formulaire de création de sujet par son propre formulaire.
» Problème avec le script d'un formulaire
» Problème avec un script de formulaire
» Problème avec un code de formulaire script
» problème avec un script pour formulaire
» Problème avec le script d'un formulaire
» Problème avec un script de formulaire
» Problème avec un code de formulaire script
» problème avec un script pour formulaire
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum