Antwort an „akuep“ verfassen

Ich will ein 10 Jahre altes Formular mit Javascript auf aktuelle Browser/Server -Anforderungen bringen. Das unten stehende läuft so nicht. Kann mir einer Hilfestellungen geben?

Danke

<script>
function categorie (formdia1) {
		let ps = formdia1.eingabe1.value;
		let v = formdia1.eingabe2.value;
		let psv = formdia1.eingabe1.value*formdia1.eingabe2.value;
		let Y = "Keine Kategorie";
		let Z = "Keine Kat.; Freie Modulauswahl!";
		let I = "Kategorie I";
		let II = "Kategorie II";
		let III = "Kategorie III";
		let IV = "Kategorie IV";
		let meld1 = "Das Druckgeraet ist ... werden.";
		let meld2 = "Das Druckgeraet liegt ... Druckgeraeterichtlinie!";
		let meld3 = "Bitte tragen Sie ... Komma).";
		let meld4 = "Das Druckgeraet muss ... A-05";
		
		if (ps <= 0.5)
		alert(meld2);
		
		if (ps > 200 && v > 0.0001 && v <= 0.1)
		alert(meld4);
		formdia1.ausgabe.value = Z;
		
		if ((ps > 0.5  && ps <= 200 && v > 0.0001 && v <= 1) || (ps > 0.5 && v > 1 &&  psv <= 25))
		alert(meld1);
		formdia1.ausgabe.value = Y;


		if (ps > 0.5 && v > 1 && psv > 25 && psv <= 50)
		formdia1.ausgabe.value = I;
		
		if (ps > 0.5 && v > 1 && psv > 25 && psv <= 50 && formdia1.option.checked)
		formdia1.ausgabe.value = III;
		
		if (ps > 0.5 && v > 1 && psv > 50 && psv <= 200 )
		formdia1.ausgabe.value = II;
		
		if (ps > 0.5 && v > 1 && psv > 50 && psv <= 200 && formdia1.option.checked)
		formdia1.ausgabe.value = III;
		
		
		if ((ps > 0.5 && v > 1 && psv > 200 && psv <= 1000) || (v <= 1 && v > 0.1 && ps > 200 && ps <= 1000))
		formdia1.ausgabe.value = III;
		
		if ((ps > 0.5 && ps <= 1000 && psv > 1000) || ps > 1000)
		formdia1.ausgabe.value = IV;
		
		if (ps=="" || v=="" || isNaN(psv)==true)
		alert(meld3);	
	}
</script>	
	<div id="rahmen" align="center">
				<table border="0" cellpadding="3" cellspacing="2" width="">
					<tr>
						<td colspan="2" bgcolor="#b0c4de">
						<p class="normaltext-9px-zentr"><br>
							<b><span class="uberschrift-18px-l-rot">Kategorie-Bestimmung</span></b></p>
						<div class="normaltext-9px-zentr">
							<p><b class="normaltext-9px-zentr">Druckger&auml;terichtlinie 2014/68/EU <br>
									Anhang II</b></p>
						</div>
					</td>
					</tr>
					<tr>
						<td width="50%" bgcolor="#dcdcdc">
							<p class="normaltext-9px-rechts">Druckger&auml;t:<br>
							</p>
							<p class="normaltext-9px-rechts">Fluid:</p>
							<p class="normaltext-9px-rechts">Fluidgruppe:</p>
						</td>
						<td width="48%" bgcolor="#dcdcdc">
					    <p class="normaltext-9px-links"><b> Beh&auml;lter</b></p>
							<p class="normaltext-9px-links"><b>Gas</b></p>
							<p class="normaltext-9px-links"><b>1 </b>(gef&auml;hrlich)</p>
						</td>
					</tr>
				<tr>
						<td colspan="2" bgcolor="#b0c4de">
						<div class="normaltext-9px-zentr">
							<p><br>
								Beh&auml;lter, die f&uuml;r ein instabiles Gas z. B. Acetylen
								bestimmt sind, sind mind. in die Kategorie III einzustufen.</p>
						</div>
					</td>
					</tr>
				<tr bgcolor="#b0c4de">
					<td colspan="2">
						<form name="formdia1" action="">
							<table border="0" cellpadding="4" cellspacing="2" width="440">
								<tr bgcolor="#d3d3d3">
									<td width="100">
										<p class="normaltext-9px-links"><b>max. zul. Druck</b></p>
									</td>
									<td width="17">
										<p class="normaltext-9px-links"> PS</p>
									</td>
									<td colspan="2">
										<p class="normaltext-9px-links"><input type="text" name="eingabe1" size="5" value="" id="eingabe1">[bar]&nbsp;</p>
									</td>
								</tr>
								<tr bgcolor="#d3d3d3">
									<td width="100">
										<p class="normaltext-9px-links"><b>Volumen<br>
											</b></p>
									</td>
									<td width="17">
										<p class="normaltext-9px-zentr">V</p>
									</td>
									<td width="120">
										<p class="normaltext-9px-links"><input type="text" name="eingabe2" size="5"> [ l ]&nbsp;</p>
									</td>
									<td><input type="reset" value="RESET"></td>
								</tr>
								<tr bgcolor="#d3d3d3">
									<td width="100">&nbsp;</td>
									<td width="17"><input type="checkbox" value="eins" name="option"></td>
									<td colspan="2">
										<p class="normaltext-9px-links">Fluid ist ein instabiles Gas</p>
									</td>
								</tr>
								<tr>
									<td colspan="4">&nbsp;</td>
								</tr>
								<tr bgcolor="#d3d3d3">
									<td width="100">
										<p class="normaltext-9px-links"><b>Ergebnis:</b></p>
									</td>
									<td colspan="2" bgcolor="red" width="156"><input type="text" name="ausgabe" size="24" readonly></td>
									<td><input type="button" size="24" name="berechnen" onClick="categorie (this.form)" value="Kategorie ermitteln"></td>
								</tr>
								<tr>
									<td colspan="4">
										<p class="normaltext-9px-links"><br>
											&copy; www.druckgeraete-online.de</p>
									</td>
								</tr>
							</table>
						</form>
					</td>
				</tr>
			</table>
			</div>
			<div id="Ebene1" class="text-rahm-blau">
			<p class="uberschrift-14px-l-blau">Besonderer Hinweis</p>
			<p><span class="normaltext-9px-links">Wenn das Volumen ... anzuwenden:</span></p>
			<p class="normaltext-9px-block">Die Druckger&auml;te ... CE-Kennzeichnung tragen.</p>
		</div>
freiwillig, öffentlich sichtbar
freiwillig, öffentlich sichtbar
freiwillig, öffentlich sichtbar

Ihre Identität in einem Cookie zu speichern erlaubt es Ihnen, Ihre Beiträge zu editieren. Außerdem müssen Sie dann bei neuen Beiträgen nicht mehr die Felder Name, E-Mail und Homepage ausfüllen.

abbrechen