• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Frage-Formular -> auf Fehlersuche

Status
Für weitere Antworten geschlossen.

sillk

Neues Mitglied
Hallo zusammen! :wink:

Bin ein totaler HTML-Neuling und habe mir etwas mit Hilfe von SELFHTML zusammengebastelt. Aber leider funktioniert es nicht und ich kann den Fehler (wahrscheinlich die Fehler) nicht finden....

Vielleicht kann mir hier einer helfen? :wink:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<script type="text/javascript">
<!--
function chkFormular() {

//Das, was später im Textfeld ausgebeben werden soll:

var v01 = "Gummi-weich-blau";
var v02 = "Gummi-dehnbar-blau";
var v03 = "Gummi-weich-dehnbar-blau";
var v04 = "Gummi-weich-rot";
var v05 = "Gummi-dehnbar-rot";
var v06 = "Gummi-weich-dehnbar-rot";


var v07 = "Holz-weich-blau";
var v08 = "Holz-dehnbar-blau";
var v09 = "Holz-weich-dehnbar-blau";
var v10 = "Holz-weich-rot";
var v11 = "Holz-dehnbar-rot";
var v12 = "Holz-weich-dehnbar-rot";

//Die Überprüfung, was angeklickt wurde:


 if(document.Checkbox.weich == true && document.Radio.Gummi == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v01";	
  }
 if(document.Checkbox.dehnbar == true && document.Radio.Gummi == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v02";	
  }
 if(document.Checkbox.weich == true && document.Checkbox.dehnbar == true &&document.Radio.Gummi == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v03";	
  }
if(document.Checkbox.weich == true && document.Radio.Gummi == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v04";	
  }
 if(document.Checkbox.dehnbar == true && document.Radio.Gummi == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v05";	
  }
 if(document.Checkbox.weich == true && document.Checkbox.dehnbar == true &&document.Radio.Gummi == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v06";	
  }

 if(document.Checkbox.weich == true && document.Radio.Holz == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v07";	
  }
 if(document.Checkbox.dehnbar == true && document.Radio.Holz == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v08";
	alert("Zusammenstellung nicht möglich!");
   	document.Formular.User.focus();
   	return false;	
  }
 if(document.Checkbox.weich == true && document.Checkbox.dehnbar == true &&document.Radio.Holz == true && document.Farbe == "blau")  {
  Text.Ausgabe.value == "v09";
	alert("Zusammenstellung nicht möglich!");
   	document.Formular.User.focus();
   	return false;		
  }
if(document.Checkbox.weich == true && document.Radio.Holz == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v10";	
  }
 if(document.Checkbox.dehnbar == true && document.Radio.Holz == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v11";
	alert("Zusammenstellung nicht möglich!");
   	document.Formular.User.focus();
   	return false;		
  }
 if(document.Checkbox.weich == true && document.Checkbox.dehnbar == true &&document.Radio.Holz == true && document.Farbe == "rot")  {
  Text.Ausgabe.value == "v12";
	alert("Zusammenstellung nicht möglich!");
   	document.Formular.User.focus();
   	return false;		
  }

}
//-->
</script>


<title>Pricing</title>


</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="52%" border="1">
  <tr> 
    <td width="34%">Pricing Tool</td>
    <td width="66%"></td>
  </tr>
  <tr> 
    <td width="34%"> 

      <form name="Checkbox" action="input_checkbox.htm">


Eigentschaften:</p>



<input type="checkbox" name="weich" value="weich"> weich 

<input type="checkbox" name="dehnbar" value="dehnbar"> dehnbar 

</p>
</form>

    </td>
    <td width="66%"> 
      <form name="Farbe" method="post" action="">
        Farbe: 
        <select name="select">
          <option value="blau">blau</option>
          <option value="rot">rot</option>
        </select>
      </form>
    </td>
  </tr>
  <tr> 
    <td width="34%"> 
      
<form name="Radio"action="input_radio.htm">


Material:</p>



<input type="radio" name="Gummi" value="Gummi"> Gummi

<input type="radio" name="Holz" value="Holz"> Holz

</p>
</form>


    </td>
    <td width="66%"> 
      
<form name="Text" action="" method="post" onSubmit="return chkFormular()">
<input size="50" name="Ausgabe" readonly>

<input type="submit" value=" Berechnen">
</form>

    </td>
  </tr>
 
</table>
</body>
</html>

Hoffe ich habe da nicht totalen Mist zusammengeschrieben.... :wink:
Vielen Dank im Voraus!

sillk
 
Werbung:
Status
Für weitere Antworten geschlossen.
Zurück
Oben