Bonjour à tous
j'explique rapidement ce que je suis en train de faire....
Un prog ou le visiteur pourra choisir une "image support", sur laquelle il pourra y adjoindre un modif en surimpression...et tout ca devrait aller sur une page recapitulatrice....
j'arrive a envoyer sur cette fameuse page recap, la ref de "l'image support", mais pas du motif (item) qui devrait aller avec....
je vous mets le code pour que ca vous parle davantage....
Alors voilà je suis confronté a 2 difficultés, bien sur la 1ere est le javascript de selection des "item"...(je maitrise tres mal le javascript)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Document sans titre</title> <script language="javascript"> function choix(menu_gauche) { src = ""; if (menu_gauche.photos[0].checked) src = "http://127.0.0.1/test/symb/coeur.gif"; if (menu_gauche.photos[1].checked) src = "http://127.0.0.1/test/symb/coeur1.gif"; if (menu_gauche.photos[2].checked) src = "http://127.0.0.1/test/symb/lui.gif"; if (menu_gauche.photos[3].checked) src = "http://127.0.0.1/test/symb/elle.gif"; def = ""; if (menu_gauche.photos[0].checked) def = ""; if (menu_gauche.photos[1].checked) def = ""; if (menu_gauche.photos[2].checked) def = ""; if (menu_gauche.photos[3].checked) def = ""; siz = ""; if (menu_gauche.photos[0].checked) siz = ""; if (menu_gauche.photos[1].checked) siz = ""; if (menu_gauche.photos[2].checked) siz = ""; if (menu_gauche.photos[3].checked) siz = ""; DinaImg = "<img src='" + src + "'" + siz +"><br><b>" + def + "</b>"; which2 = DinaImg if (document.getElementById){ document.getElementById("photo").innerHTML=which2; } } function check(){ var check = document.getElementById("item").checked; } </script> <style type="text/css"> <!-- .Style1 {font-family: "Monotype Corsiva"} body { margin: 0px; background-color: #d6ff31; } /*-- partie du code des DIV----------------------> */ .truc1{ width: 240px; height: 240px; background-color:transparent; top: 105px; left: 503px; z-index: 1; position:absolute; } .truc2{ width: 237px; height: 70px; border: 1px; background-color:transparent; top: 161px; left: 505px; z-index: 2; position:absolute; } /* <!-- fin du code des DIV--> */ </style> </head> <body> <?php if(isset($_POST['mod'])) $mod=$_POST['mod']; else $mod=""; if(isset($_POST['item'])) $item=$_POST['item']; else $item=""; /* ---------------partie du code qui permet de situer l'emplacement des "images support---!> */ if ($mod=='mod1') { $url='http://127.0.0.1/test/image/blanc.jpg';} elseif ($mod=='mod2') { $url='http://127.0.0.1/test/image/blancf.jpg';} elseif ($mod=='mod3') /*----------------------------------------------- */ { $url="";} /*-- fin du code des 'images support" */ /*---début du code des items (décorations) destinée a etre placées sur les images support */ <form name=menu_gauche > <table width="20%" valign="up" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="center"><img src="symb/coeur.gif" width="50"></td> <td width="50%" align="center"><img src="symb/coeur1.gif" width="50"></td> </tr> <tr> <td align="center"><input type="radio" name="photos" value=1 id="item">Item-1<br></td> <td align="center"><input type="radio" name="photos" value=2 id="item">Item-2<br></td> </tr> /*----------------------------------------------------- */ </tr></table> <div class="truc1"><img src="<?php echo $url;?>"></div> <td> <div align="center" class="truc2" id="photo" ></div> </td> <br> <td> <input type="button" name="but" value="Affichez une image" onclick="choix(menu_gauche)" style="background-color:yellow"> </form></td> /*---fin du code des items */ <td> */code d'envoi des elements sur une page du genre "panier" */ <form action="enregistrement.php" method="post"> <input type="submit" name="submit" value="Commander" onclick="commander()"> <input type="hidden" value="<?php echo $mod; ?>" name="mod" id="mod"> <input type="hidden" value="<?php echo $item; ?>" name="photos" id="item"> </form></td> </tr> </table> </body> </html>
la 2eme de sont les 2 "<form action=.....>"
Merci en tout cas pour le temps que vous passerez sur ce bout de script
Partager