Veröffentlicht 12. Februar 200322 j Hi Zusammen. ich suche eine Möglichkeit Dropdown felder in meine HP einzubinden die es ermöglichen eine Dropdownliste einzubinden und zugleich eine "custom" text-eingabe möglich ist. also im prinzip: <input type=text ... > mit einem dropdownfeld zusätzlich als auswahl. eine mögliche lösung bitte in Javascript,PHP, oder html..... Gruss Markus
13. Februar 200322 j jo ich meine combo boxen aber in denen sollte man nicht nur die vorgegebenen werte nehmen können sondern halt auch ein textfeld da sein in das man auch was eingens tippen kann.
13. Februar 200322 j ich habe mir jetzt was überlegt. ich werde mir folgendes basteln: ich nehme ein std. dropdownmenu und werde so das man es nicht sieht ein standard text feld über dieses legen. so kann man dann beide funktionen verbinden. dies werde ich denke ich mit layern realisieren gruss kills
31. März 200322 j Hi Leute, hab meine Lösung endlich gefunden. hier der Quelltext: <select name='listFr' size='5' style='position:absolute; top:55px; left:602px; width:80; z-index:-1; visibility:hidden' onClick='dropdownreturninput ( Fr, listFr);' onBlur='listFr.style.visibility=\"hidden\";' onKeyup='dropdowndownarrowkey ( Fr, listFr); dropdownuparrowkey ( Fr, listFr); dropdownenterkey ( Fr, listFr);'> <option value='BiH' >BiH</option> <option value='Urlaub'>Urlaub</option> <option value='Schule'>Schule</option> <option value='BiH/früh' >BiH/früh</option> <option value='BiH/mittel' >BiH/mittel</option> <option value='BiH/spät' >BiH/spät</option> </select> <input size=8 maxlength=12 type='text' value='$Fr' name='Fr' style='position:absolute; top:33px; left:607px; z-index:3;' onClick='dropdownshowlist ( listFr);' onBlur='dropdownhidelist ( listFr);' onKeyup='dropdowndownarrowkey ( Fr, listFr); dropdownuparrowkey ( Fr, listFr); dropdownenterkey ( Fr, listFr);'> dieser teil darüber wiederholt sich für Montag,Dienstag,Mittwoch,Donnerstag..... ------------------------ function dropdownreturninput ( oTxtField, oList) { if ( oList.name == "listAll") { window.document.Formular.Mo.innerText=oList.value; window.document.Formular.Di.innerText=oList.value; window.document.Formular.Mi.innerText=oList.value; window.document.Formular.Do.innerText=oList.value; window.document.Formular.Fr.innerText=oList.value; window.document.Formular.All.innerText=oList.value; oTxtField.focus(); } else { oTxtField.innerText=oList.value; oTxtField.focus(); } } function dropdowndownarrowkey ( oTxtField, oList) { if (event.keyCode == 40 && oList.selectedIndex < oList.options.length-1) { oList.style.visibility="visible"; oList.selectedIndex++; if ( oList.name == "listAll") { window.document.Formular.Mo.innerText=oList.value; window.document.Formular.Di.innerText=oList.value; window.document.Formular.Mi.innerText=oList.value; window.document.Formular.Do.innerText=oList.value; window.document.Formular.Fr.innerText=oList.value; window.document.Formular.All.innerText=oList.value; } else { oTxtField.innerText=oList.value; } } } function dropdownuparrowkey ( oTxtField, oList) { if (event.keyCode == 38 && oList.selectedIndex > 0) { oList.style.visibility="visible"; oList.selectedIndex--; if ( oList.name == "listAll") { window.document.Formular.Mo.innerText=oList.value; window.document.Formular.Di.innerText=oList.value; window.document.Formular.Mi.innerText=oList.value; window.document.Formular.Do.innerText=oList.value; window.document.Formular.Fr.innerText=oList.value; window.document.Formular.All.innerText=oList.value; } else { oTxtField.innerText=oList.value; } } } function dropdownenterkey ( oTxtField, oList) { if (event.keyCode == 13) { oList.style.visibility="hidden"; oTxtField.focus(); } } function dropdownshowlist ( oList) { if ( oList.style.visibility == "hidden" ) { oList.style.visibility="visible"; } } function dropdownhidelist ( oList) { if ( oList.style.visibility == "visible" ) { oList.style.visibility="hidden"; } }
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.