[JavaScript] mehrfach select boxen

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • [JavaScript] mehrfach select boxen

    will mir ne art navi bauen mit 3 selectboxen

    sowas habt ihr schonmal gesehen


    wählt man box 1 kommt in box 2 das passende zur value aus box 1 .
    in box 2 wählt man wieder und es kommt in box 3 das passende zu value aus box 2.

    ändert man ws z.b. in box 1 steht in box 2 und 3 wieder bitte wählen sie was in box 1


    das mal sone kurze beschreibung.


    so etwas gibts doch sicher schon ansatzweise fertig ?
    ich habe hier in den scripten nichts gefunden, und weiß auch nicht wonach ich da googlen muss.

    kann mir da mal wer bitte unter die arme greifen ?

    http://www.soffiles.com/test.htm <-- das kommt son bisschen daran
    Zuletzt geändert von mukraker; 25.06.2003, 16:53.
    thx Mukraker

  • #2
    nvidia hat sowas auf der site unter "drivers" ' habe ich gehört'


    cool wäre es wenn des für DW dafür ne extentesion gibt!
    thx Mukraker

    Kommentar


    • #3
      ist das so recht?
      Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      
      <html>
      <head>
      	<title>Untitled</title>
      </head>
      
      <body>
      
      <script language="JavaScript" type="text/javascript">
      <!--
      	var CatList = new Array(); 
      	var CatNum = 0; 
      
      	function game(catname, gameID, catID) {
      		this.CatName = catname; 
      		this.GameID = gameID; 
      		this.CatID = catID;
      	} 
      
      	function AddCatSelection(catname, gameID, catID) {CatList[CatNum++]=new game(catname, gameID, catID);} 
      			
      	AddCatSelection("Deathmatch", "SoF", "123");
      	AddCatSelection("CTF", "SoF", "564");
      	AddCatSelection("Wallpapers", "SoF2", "789");
      
      	// Change the Game List according to the selected game
      	function ChangeCatList(GameID){
      
      				var SelectedGameID = GameID.options[GameID.selectedIndex].value;
      				var j = 0;
      		 
      		 		if(SelectedGameID != ""){
      					// create the new cat list for the selected game
      					for(var i = 0; i < CatList.length; i++){
      						if(SelectedGameID == CatList[i].GameID){
      							document.FileSearchForm.CatSelect[j] = new Option(CatList[i].CatName, CatList[i].CatID);
      							j++;
      						}
      					}
      				}else{
      //					var defaultgame = SoF;
      //					for(var i = 0; i < CatList.length; i++){
      //						if(SelectedGameID == CatList[i].defaultgame){
      //							document.FileSearchForm.CatSelect[j] = new Option(CatList[i].CatName, CatList[i].CatID);
      //							j++;
      //						}
      //					}
      			        // create the new game list for all games
      					for(var i = 0; i<CatList.length; i++){
      						var k = UBI_CheckDuplicate(j, CatList[i].CatName)
      						if(k < 0){
      							document.FileSearchForm.CatSelect[j] = new Option(CatList[i].CatName, CatList[i].CatID);
      							j++;
      						}else if (CatList[i].GameID == "PC") {
      							document.FileSearchForm.CatSelect[k] = new Option(CatList[i].CatName, CatList[i].CatID);
      						}
      					}
      				}
      				// reset the number of items in the select box when a game is selected
      				document.FileSearchForm.CatSelect.length = j;	
      		}
      
      		// Fixes Netscape 4.x resize issue
      		if ((navigator.appName == "Netscape") && (parseFloat(navigator.appVersion) > 4.08)){
      		        window.captureEvents(Event.RESIZE);
      		        window.onresize = handleResize;
      		}
      
      		// Fixes Netscape 4.x resize issue: call by IF above
      		function handleResize(){
      		        location.reload();
      		        return false;
      		}			
      			
      	// -->
      	</script>
      
      <form id=FileSearchForm name=FileSearchForm action="search.files" method=post>
      <select id=GameSelect name=GameSelect onChange="ChangeCatList(this)" style="font-size: 10px; font-family: Arial, Helvetica; width:120px; background-color: #394660; color: #D0E8FF" size=1>
      	<option value="SoF" selected>Soldier of Fortune</option>
      	<option value="SoF2">Soldier of Fortune 2: Double Helix</option>
      </select>
      <select name=CatSelect style="font-size: 10px; font-family: Arial, Helvetica; width:120px; background-color: #394660; color: #D0E8FF" size=6">
      	<option>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</option>
      </select>
      				</a>
      			</td>
      		</tr>
      
      </body>
      </html>
      INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


      Kommentar


      • #4
        OffTopic:
        @Abraxax
        krank?
        Ich denke, also bin ich. - Einige sind trotzdem...

        Kommentar


        • #5
          Original geschrieben von mrhappiness
          OffTopic:
          @Abraxax
          krank?
          OffTopic:
          ne. aber in den quellcode kann doch jeder schauen.
          aber verrate mukraker nicht, das ich das nur dorther kopiert habe...
          INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


          Kommentar


          • #6
            naja

            abraxx: den krams habe ich mir auch angeschaut
            BEST! ist das aber noch nicht, ich werde mir das wohl nen bisschen abändern müssen
            thx Mukraker

            Kommentar

            Lädt...
            X