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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
| <!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title>Saisie d un medicament</title>
<script language="JavaScript">
<!--
function couleur(obj) {
obj.style.backgroundColor = "#FFFFFF";
}
function check() {
var msg = "";
//---------------------------------------------------
if (document.formulaire.NomC.value == "") {
msg += "Nom commercial incomplet\n\n";
document.formulaire.NomC.style.backgroundColor = "#F3C200";
}
//---------------------------------------------------
if (document.formulaire.FrmF.value != "") {
var chkZ = 1;
for(i=0;i<document.formulaire.FrmF.value.length;++i)
if(document.formulaire.FrmF.value.charAt(i) < "."
|| document.formulaire.FrmF.value.charAt(i) > "9")
chkZ = -1;
if(chkZ == -1) {
msg += "Forme fournisseur invalide\n\n";
document.formulaire.FrmF.style.backgroundColor = "#F3C200";
}
}
else{ msg += "Forme fournisseur incomplet\n\n";
document.formulaire.FrmF.style.backgroundColor = "#F3C200";
}
//---------------------------------------------------
if (document.formulaire.FrmC.value == "") {
msg += "Forme conservation incomplet\n\n";
document.formulaire.FrmC.style.backgroundColor = "#F3C200";
}
if (document.formulaire.FrmA.value == "") {
msg += "Forme ddministration incomplet\n\n";
document.formulaire.FrmA.style.backgroundColor = "#F3C200";
}
if (document.formulaire.FrmD.value == "") {
msg += "Forme distribution incomplet\n\n";
document.formulaire.FrmD.style.backgroundColor = "#F3C200";
}
if (document.formulaire.PoiAT.value == "") {
msg += "Poids distribution incomplet\n\n";
document.formulaire.PoiAT.style.backgroundColor = "#F3C200";
}
if(!(document.getElementById('lib').checked) && !(document.getElementById('spe').checked)){
//pa coché
msg += "Choisir un type de posologie\n\n";
}
if (msg == "") return(true);
else {
alert(msg);
return(false);
}
}
function copieChoix()
{
var no = document.formulaire.getElementById("no1");
var res = document.formulaire.getElementById("result1");
var option = no.options[no.selectedIndex].text;
var txt = res.value;
txt = txt + option;
if (option != "Faites un choix") {
/*en ôtant les // l'input redevient accessible
sinon, il se remplit mais reste inaccessible */
res.disabled=false;
res.value=txt;
}
}
//-->
</script>
</head>
<body onLoad='document.getElementById("result").disabled=true;'>
<h1 align="center">Saisie d un medicament</h1>
<table align="center"><tr><td>
<fieldset>
<legend>Veuillez remplir ce formulaire:</legend>
<form name="formulaire" onSubmit="return check();" method="POST" action="SelectCoffee.do">
Select coffee
Type:
<select name="type" size=1>
<option value="milky" selected>Milky</option>
<option value="froffy">Froffy</option>
<option value="icey">Icey</option>
<option value="strong">Spaced Out</option>
</select>
<table cellpadding="6" cellspacing="10"><tr><td>
Nom commercial</td><td>
<input name="NomC" value="99" size="60" onKeyUp="javascript:couleur(this);" />
</td></tr><tr><td>
Forme </td><td>
<input name="FrmF" value="1" onKeyUp="javascript:couleur(this);" />
<select name="FrmFm" size=1>
<option value="carton(s)" selected>carton</option>
<option value="boite(s)">boite</option>
<option value="sachet(s)">sachet</option>
<option value="autre">avy any @base</option>
</select>
</td></tr><tr><td>
Forme conservation:</td><td>
<input name="FrmC" value="1" onKeyUp="javascript:couleur(this);" />
<select name="FrmCm" size=1>
<option value="carton(s)" selected>carton</option>
<option value="boite(s)">boite</option>
<option value="sachet(s)">sachet</option>
<option value="autre">avy any @base</option>
</select>
</td></tr><tr ><td>
Forme administration:</td><td>
<input name="FrmA" value="1" onKeyUp="javascript:couleur(this);" />
<select name="FrmAm" size=1>
<option value="a avaler" selected>carton</option>
<option value="goutte">boite</option>
<option value="efferve100">sachet</option>
<option value="autre">avy any @base</option>
</select>
</td></tr><tr ><td>
Forme distribution:</td><td>
<input name="FrmD" value="20" onKeyUp="javascript:couleur(this);" />
<select name="FrmDm" size=1>
<option value="comprimes" selected>comprimes</option>
<option value="gouttes">gouttes</option>
<option value="sirop">sirop</option>
<option value="autre">avy any @base</option>
</select>
</td></tr><tr><td>
de(masse):</td><td>
<input name="PoiAT" value="99" onKeyUp="javascript:couleur(this);" />
<select name="type" size=1>
<option value="l" selected>l</option>
<option value="kg">kg</option>
<option value="dl">dl</option>
<option value="ml">ml</option>
<option value="g">g</option>
</select>
</td></tr><tr><td>
Type de posologie:</td><td>
<input id="lib" type="checkbox" name="posli" value="Posologie Libre" tabindex="14" checked />Libre<br>
<input id="spe" type="checkbox" name="posdf" value="Posologie specifique" tabindex="14" />Specifique
</td></tr><tr><td>
Dci_rattaches:</td><td>
<br><br>
<select id="no1" onChange="copieChoix();" >
<option>Faites un choix</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
</select>
<input type="button" onclick="copieChoix();" value="Ajouter -->"/>
<input type="text" id="result1" size="20"/>
</td></tr></table>
<br><br>
<center>
<input type="Submit" />
</center>
</form>
</fieldset></td></tr></table>
</body>
</html> |
Partager