![]() |
| |||
| quand le clique sur les boutons commander la valeur img* n est pas correctement envoyer au cgi(mon cgi envoie une erreur fatale quand le param image est egal Ã*** une chaine vide) quand je remlace value="img*" par un nombre cela fonctionne bien que ce passe t il je dois recevoir le veritable nom de l'image dans mon cgi j en ai besoin apres pour les manipuler mon cgi fonctionne tres bien je poste mon code html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <form action="http://localhost/cgi-bin/vente0.03.cgi" method="post"> <table> <tbody> <tr> <td> <img src="images/img202_1.jpg" alt="" border="0" height="176" width="200"> <hr><i>image numero 1 prix 39.99euros</i> <hr><button type="submit" name="image" value="img202_1.jpg"><img src="images/commander.gif"></button> & nbsp;<a href="images/img202_1.jpg">agrandir</td> <td> <img src="images/img002_3.jpg" alt="" border="0" height="176" width="200"> <hr><i>image numero 2 prix 39.99euros</i> <hr><button type="submit" name="image" value="img002_3.jpg"><img src="images/commander.gif"></button> & nbsp;<a href="images/img002_3.jpg">agrandir</a></td> <td> </td> |
| | ||||
| ||||
| |
| |||
| On 3 avr, 10:31, "john.swilting" <john.swilt...***wanadoo.fr> wrote: > quand le clique sur les boutons commander la valeur img* n est pas > correctement envoyer au cgi(mon cgi envoie une erreur fatale quand le param > image est egal à une chaine vide) > quand je remlace value="img*" par un nombre cela fonctionne bien > que ce passe t il > je dois recevoir le veritable nom de l'image dans mon cgi > j en ai besoin apres pour les manipuler > mon cgi fonctionne tres bien > je poste mon code html: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" > content="text/html; charset=iso-8859-1"> > <title>Untitled Document</title> > </head> > <body> > <form action="http://localhost/cgi-bin/vente0.03.cgi" method="post"> > <table> > <tbody> > <tr> > <td> <img src="images/img202_1.jpg" alt="" border="0" > height="176" > width="200"> > <hr><i>image numero 1 prix 39.99euros</i> > <hr><button type="submit" name="image" value="img202_1.jpg"><img > > src="images/commander.gif"></button> & nbsp;<a > href="images/img202_1.jpg">agrandir</td> > <td> <img src="images/img002_3.jpg" alt="" border="0" > height="176" > width="200"> > <hr><i>image numero 2 prix 39.99euros</i> > <hr><button type="submit" name="image" value="img002_3.jpg"><img > > src="images/commander.gif"></button> & nbsp;<a > href="images/img002_3.jpg">agrandir</a></td> > <td> </td> Salut... Il est où le param image? Y a bien un submit de nom image mais je pense pas que ce soit comme ça qu'il faille faire. Pourquoi ne pas utiliser un champ caché nommé image qui serait valué lors d'un clic sur un des boutons? Exemple : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <form action="http://localhost/cgi-bin/vente0.03.cgi" method="post"> <input type="hidden" name="image" value=""> <table> <tbody> <tr> <td> <img src="images/img202_1.jpg" alt="" border="0" height="176" width="200"> <hr><i>image numero 1 prix 39.99euros</i> <hr><button type="button" onclick="document.forms[0].image.value='img202_1.jpg';document.forms[0]..submit();"><img src="images/commander.gif"></ button> & nbsp;<a href="images/img202_1.jpg">agrandir</td> <td> <img src="images/img002_3.jpg" alt="" border="0" height="176" width="200"> <hr><i>image numero 2 prix 39.99euros</i> <hr><button type="button" onclick="document.forms[0].image.value='img002_3.jpg';document.forms[0]..submit();"><img src="images/commander.gif"></ button> & nbsp;<a href="images/img002_3.jpg">agrandir</a></td> <td> </td> |
| |||
| Dam wrote: > <button type="button" > onclick="document.forms[0].image.value='img002_3.jpg';document.forms[0].submit();"><img > > src="images/commander.gif"></ > button> j ai essayer les modifications le parametres n est pas bien transmis au cgi et le javascript je n y comprends rien et je precise si je mets dans mon html original un nombre Ã*** la place de img* ça marche le cgi reçoit le param image |
| |||
| Dam wrote: > On 3 avr, 10:31, "john.swilting" <john.swilt...***wanadoo.fr> wrote: >> quand le clique sur les boutons commander la valeur img* n est pas >> correctement envoyer au cgi(mon cgi envoie une erreur fatale quand le >> param image est egal Ã*** une chaine vide) >> quand je remlace value="img*" par un nombre cela fonctionne bien >> que ce passe t il >> je dois recevoir le veritable nom de l'image dans mon cgi >> j en ai besoin apres pour les manipuler >> mon cgi fonctionne tres bien >> je poste mon code html: >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 >> Transitional//EN" >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html >> xmlns="http://www.w3.org/1999/xhtml"> <head> >> <meta http-equiv="Content-Type" >> content="text/html; charset=iso-8859-1"> >> <title>Untitled Document</title> >> </head> >> <body> >> <form action="http://localhost/cgi-bin/vente0.03.cgi" method="post"> >> <table> >> <tbody> >> <tr> >> <td> <img src="images/img202_1.jpg" alt="" border="0" >> height="176" >> width="200"> >> <hr><i>image numero 1 prix 39.99euros</i> >> <hr><button type="submit" name="image" value="img202_1.jpg"><img >> >> src="images/commander.gif"></button> & nbsp;<a >> href="images/img202_1.jpg">agrandir</td> >> <td> <img src="images/img002_3.jpg" alt="" border="0" >> height="176" >> width="200"> >> <hr><i>image numero 2 prix 39.99euros</i> >> <hr><button type="submit" name="image" value="img002_3.jpg"><img >> >> src="images/commander.gif"></button> & nbsp;<a >> href="images/img002_3.jpg">agrandir</a></td> >> <td> </td> > > Salut... Il est où le param image? > Y a bien un submit de nom image mais je pense pas que ce soit comme ça > qu'il faille faire. > Pourquoi ne pas utiliser un champ caché nommé image qui serait valué > lors d'un clic sur un des boutons? > Exemple : > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- > transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" > content="text/html; charset=iso-8859-1"> > <title>Untitled Document</title> > </head> > <body> > <form action="http://localhost/cgi-bin/vente0.03.cgi" method="post"> > <input type="hidden" name="image" value=""> > <table> > <tbody> > <tr> > <td> <img src="images/img202_1.jpg" alt="" border="0" > height="176" > width="200"> > <hr><i>image numero 1 prix 39.99euros</i> > <hr><button type="button" > onclick="document.forms[0].image.value='img202_1.jpg';document.forms[0].submit();"><img > > src="images/commander.gif"></ > button> & nbsp;<a > href="images/img202_1.jpg">agrandir</td> > <td> <img src="images/img002_3.jpg" alt="" border="0" > height="176" > width="200"> > <hr><i>image numero 2 prix 39.99euros</i> > <hr><button type="button" > onclick="document.forms[0].image.value='img002_3.jpg';document.forms[0].submit();"><img > > src="images/commander.gif"></ > button> & nbsp;<a > href="images/img002_3.jpg">agrandir</a></td> > <td> </td> ya aussi faire correspondre les numeros transmits par mon html original Ã*** des images Ã*** l'interieur du cgi par exemple value="1" = img002_3.jpg |
| |
| |
![]() |
| Tags: formulaires, problemes |
| Outils de la discussion | |
| Modes d'affichage | |
| |
| ||||
| Discussion | Auteur | Forum | Réponses | Dernier message |
| problemes formulaires | john.swilting | Newsgroup fr.comp.infosystemes.www.pages-perso | 6 | 03/04/2007 10h13 |
| problemes formulaires | john.swilting | Newsgroup fr.comp.infosystemes.www.serveurs | 6 | 03/04/2007 10h13 |
| problemes formulaires html | john.swilting | Newsgroup fr.comp.lang.general | 0 | 03/04/2007 09h40 |
| Formulaires | Stéphane | Newsgroup microsoft.public.fr.exchange.clients | 2 | 29/04/2006 14h18 |