Bonjour � tous
Bon je tiens � dire que je ne suis pas expert en html...
Je suis en train de faire un projet ou j'asservis un moteur par rapport � une consigne de vitesse. Jusque l� pas de probleme...
J'ai cr�e une fenetre de supervision que j'ai coup� en 2 frames.
L'une avec un champ de texte ou l'on doit rentrer une valeur de consigne.
L'autre fenetre qui affiche des informations (vitesse du moteur et consigne)et qui se met � jour tte les secondes.
Ce que je voudrais faire, c'est de rentrer la consigne et que cette valeur soit renvoy�e dans l'url (method post il me semble) de la page rafraichi.
J'avais pens� � utiliser Ajax mais je suis pas assez cal� pour le faire...
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Consigne</title> </head> <frameset rows="40%,60%" cols="*" framespacing="0" frameborder="NO" border="0"> <frame src="frame.htm" name="topFrame" scrolling="NO" noresize> <frame src="cgi.htm" name="mainFrame"> </frameset> <noframes><body> </body></noframes> </html>
Page FRAME.htm
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 <html> <head> <title>Supervision de régulation</title> <style type="text/css"> body { background-color: #FFFFFF;} body,td,th { color: #000000;} .Style1 { font-size: 24px; font-weight: bold;} .Style2 { color: #E23131; font-family: Verdana, Arial, Helvetica, sans-serif;} #titre { border : 2px solid black } </style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language = "javascript"> function envoi (f) { parent.frames["mainFrame"].document.forms["form2"].Valeur.value = f.Valeur.value}; </script> </head> <body> <div align="center" class="Style1"> <p align="right"><img src="IMG/beck.gif" width="133" height="51"></p> </div> <div id="titre" align="center" class="Style1"> <p class="Style2">SUPERVISION DE REGULATION DE VITESSE EMBARQUEE</p> </div> <p> </p> <p align="center"><strong>Entrez la valeur de la consigne</strong></p> </body> <FORM NAME="Standard" METHOD=get ACTION="http://192.168.0.129/frame.htm"> <DIV ALIGN=center> <P><INPUT TYPE=CHECKBOX NAME="Valide" VALUE="" STYLE="width: 0.44cm; height: 0.4cm"> <INPUT TYPE=TEXT NAME="Valeur" SIZE=12 STYLE="width: 2.8cm; height: 0.7cm"> <INPUT TYPE=button NAME="Boutton" VALUE="Envoyer" onClick="envoi(this.form)" STYLE="width: 2.0cm; height: 0.7cm"> <BR><BR> </form> </html>
Page CGI.htm
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 <html> <head> <title>Supervision de régulation</title> <style type="text/css"> body { background-color: #FFFFFF;} body,td,th { color: #000000;} .Style1 { font-size: 24px; font-weight: bold;} .Style2 { color: #E23131; font-family: Verdana, Arial, Helvetica, sans-serif;} </style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body> <META HTTP-EQUIV="Refresh" CONTENT="1"> <div align="center"> <p align="justify"> </p> <p> </p> <table width="200" height="64" border="2" bordercolor="#030303" bgcolor="#ECECEC"> <tr> <td width="91"><div align="center">Consigne</div></td> <td width="91">RET_CONS </td> </tr> </table> <p> </p> <table width="200" height="58" border="2" bordercolor="#000000" bgcolor="#ECECEC"> <tr> <td width="92" height="52"><div align="center">Vitesse du moteur </div></td> <td width="92" bgcolor="#ECECEC">VIT_MOT</td> </tr> </table> <p align="left"> </p> <p> </p> <p> </p> <script language="javascript"> today = new Date(); document.write("Nous sommes le ",today.getDate(),"/",today.getMonth()+1,"/",today.getYear()+1900,"<br />"); document.write("Il est ",today.getHours(),":",today.getMinutes(),":",today.getSeconds(),"<br />"); </script> </div> </body> </html>
Merci d'avance...
Partager