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.

javascript firefox problem

Empfohlene Antworten

Veröffentlicht

Hallo mein script funktioniert leider nur im ie und opera und nicht im firefox..

weis jemand woran das liegt?

gibt es grundsätzlich dinge die man mit javascript und firefox beachten muss?

<script type="text/javascript">
function myup(obj)
{
o = document.getElementById(obj);
if (o.value>=3){alert("maximum ausgewählt");}
else {o.value++;}
};

function mydown(obj)
{
o = document.getElementById(obj);
if (o.value<=0){}
else {o.value--;}
};
</script>


<input type=button width=1px value=- onclick ="mydown('anzahl');">
<input type=input size=1 maxlength=1 name=anzahl value=0>
<input type=button width=1px value=+ onclick ="myup('anzahl');">
[/PHP]

schonmal danke für jede hilfe

Moin,

steht denn etwas hilfreiches unter /Extras/Fehler-Konsole?

Gruß

Reinhold

nein da werden keine fehler angezeigt

nein da werden keine fehler angezeigt

Das halte ich für ein Gerücht!

Ich habe deinen Code eben mal in ein HTML-Grundgerüst eingefügt und gestartet. Ich erhalte bei beiden Buttons im Fehlerprotokoll

"o has no properties"

Vielleicht hilft dir das ja.

Reinhold.

BTW: Wie konntest du das denn übersehen?

1. Attribute in HTML mit " beginnen und beenden

<input name="anzahl" nicht input name=anzahl

2.

document.getElementById bezieht sich auf "ID" nicht auf name.

es muss <input id="anzahl" heißen. Ich halte es für ein Gerücht das die anderen Browser das doch ermöglichen.

bitte sehr,

Ich halte es für ein Gerücht das die anderen Browser das doch ermöglichen.

Es ist ja auch kein Gerücht, dass der IE z.B. das alt-Attribut als title-Attribut nimmt (wenn kein title vorhanden), also als Hint für ein Bild. Obwohl das alt-Attribut ja was ganz anderes ist ;)

Also es wäre zumindest denkbar...

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.