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.

Problem bei Parameterübergabe

Empfohlene Antworten

Hi Folks,

ich habe ein Problem:

ich habe ein Dropdownmenü, mit dem Value user.

Bei einem location.reload() möchte ich mittels alert("") den Inhalt vom ausgewählten Eintrag ausgelesen haben.

Wie funzt das?! :(

Danke für eure Hilfe,

Marcus


<select id="meineFeldId">

   <option value="" label=""></option>

   <option value="user" label="user" selected="selected">user</option>

   <option value="a" label="a">a</option>

</select>


alert( document.getElementById( 'meineFeldId').value);

self.location.reload();

ah danke, es funzt ;)

jetzt habe ich nur ein "winziges" Problem.

ich habe eine SQL-Abfrage

SELECT * FROM user WHERE user_login_name='$login'

bei $login soll er selektierte Eintrag aus dem Dropdown-Menü

<select name="user" id="user" style="height:200px;" onChange="SeiteAkt();">

    <option value="eintrag1">Eintrage1</option>

    <option value="eintrag2">Eintrage2</option>

    <option value="eintrag3">Eintrage3</option>

</select>

in die SQL-Abfrage geschrieben werden.

Hast du ne Ahnung, wie ich diesen Wert übergebe?


<?php
if ( !empty( $_POST)) {
$sql = 'SELECT * FROM user WHERE user_login_name="'. $_POST['user'] .'"';
var_dump( $sql);
} else {
?>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<select name="user" id="user" style="height:200px;" onChange="this.form.submit();">
<option value="eintrag1">Eintrage1</option>
<option value="eintrag2">Eintrage2</option>
<option value="eintrag3">Eintrage3</option>
</select>
</form>

<?php
}
?>
[/PHP]

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.