Richie: Formular auslesen mit Javascript

Beitrag lesen

<html>

<head> <title>TESTFORMULAR</title> <link href="portal.css" type="text/css" rel="stylesheet">

<script type="text/javascript">  <!--  //var test= document.forms["MIPFormular"];  function swap(){ //if (test.value != 0) window.close();   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Entertainment

Devices"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Handhelds"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Tablet PCs"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Notebooks"){    MIPFormular.Unterkategorie.options[0].value = "Home";    document.getElementById("u0").firstChild.nodeValue = "Home";    MIPFormular.Unterkategorie.options[1].value = "Professional";    document.getElementById("u1").firstChild.nodeValue = "Professional";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Thin Clients"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Personal

Computers"){    MIPFormular.Unterkategorie.options[0].value = "Home";    document.getElementById("u0").firstChild.nodeValue = "Home";    MIPFormular.Unterkategorie.options[1].value = "Professional";    document.getElementById("u1").firstChild.nodeValue = "Professional";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Workstations"){    MIPFormular.Unterkategorie.options[0].value = "Mobile";    document.getElementById("u0").firstChild.nodeValue = "Mobile";    MIPFormular.Unterkategorie.options[1].value = "Stationary";    document.getElementById("u1").firstChild.nodeValue = "Stationary";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Broadband

Solutions"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Servers"){    MIPFormular.Unterkategorie.options[0].value = "Intel based Servers";    document.getElementById("u0").firstChild.nodeValue = "Intel based Servers";    MIPFormular.Unterkategorie.options[1].value = "BS2000/OSD Servers";    document.getElementById("u1").firstChild.nodeValue = "BS2000/OSD Servers";    MIPFormular.Unterkategorie.options[2].value = "UNIX Servers";    document.getElementById("u2").firstChild.nodeValue = "UNIX Servers";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Storage"){    MIPFormular.Unterkategorie.options[0].value = "Disk";    document.getElementById("u0").firstChild.nodeValue = "Disk";    MIPFormular.Unterkategorie.options[1].value = "Tape";    document.getElementById("u1").firstChild.nodeValue = "Tape";    MIPFormular.Unterkategorie.options[2].value = "Optical";    document.getElementById("u2").firstChild.nodeValue = "Optical";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Software"){    MIPFormular.Unterkategorie.options[0].value = "";    document.getElementById("u0").firstChild.nodeValue = "Unterkategorie";    MIPFormular.Unterkategorie.options[1].value = "";    document.getElementById("u1").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[2].value = "";    document.getElementById("u2").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[3].value = "";    document.getElementById("u3").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[4].value = "";    document.getElementById("u4").firstChild.nodeValue = ".";    MIPFormular.Unterkategorie.options[5].value = "";    document.getElementById("u5").firstChild.nodeValue = ".";   }   if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value ==

"Displays/Accesories"){    MIPFormular.Unterkategorie.options[0].value = "Displays";    document.getElementById("u0").firstChild.nodeValue = "Displays";    MIPFormular.Unterkategorie.options[1].value = "Input Devices";    document.getElementById("u1").firstChild.nodeValue = "Input Devices";    MIPFormular.Unterkategorie.options[2].value = "Home Accesories";    document.getElementById("u2").firstChild.nodeValue = "Home Accesories";    MIPFormular.Unterkategorie.options[3].value = "Mainboards";    document.getElementById("u3").firstChild.nodeValue = "Mainboards";    MIPFormular.Unterkategorie.options[4].value = "Printers";    document.getElementById("u4").firstChild.nodeValue = "Printers";    MIPFormular.Unterkategorie.options[5].value = "Scanners";    document.getElementById("u5").firstChild.nodeValue = "Scanners";   }   MIPFormular.Unterkategorie.selectedIndex = 0;  }  //-->  </script>

</head>