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.

Attributwechsel bei onClick()

Empfohlene Antworten

Veröffentlicht

Hi,

bin grad dabei nen vb-projekt in web-format umzusetzen. ich design das ganze mit php, javascript und html. nun scheiter grad an folgendem problem:

in nem iframe wird ne neue source geöffnet, welche ne mysql-db einliest und in ner table wiedergibt.

in dieser table will ich nun der <tr> das attribut onClick mit folgender javascriptfunktion anfügen, damit die tablerow beim anklicken farblich hervorgehoben wird:


<?php
$zaehler <- wird in while-schleife für jede <tr> ++;

echo"
...
<tr align=\"center\" id=\"Reihe".$zaehler."\" onClick=
\"window.status='Reihe".$zaehler."';
document.all.Reihe".$zaehler.".setAttribute(\"bgcolor\",\"#996655\")\">
...";
?>
[/PHP]

leider klappt das mit dem hervorheben nicht so ganz.... kann mir da evtl. einer helfen?

... hat sich so halbwegs erledigt...

hatte die literale falsch gesetzt...

... falls jemandem was effizienteres einfallen sollte, kann er´s trotzdem hier poschten... *g*

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.