Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dropdown felder

Empfohlene Antworten

Veröffentlicht

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

Meinst du Combo-Boxen? Also <select option> - Felder?

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.

Das geht AFAIK gar nicht.

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

  • 1 Monat später...

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.