Teil von SELFHTML Forum Teil von SELFHTML Forumsarchiv Teil von 2006 Teil von Dezember

SELFHTML Forumsarchiv
sound buttons, but not flash :)

Informationsseite
  1. Seite (JAVASCRIPT) sound buttons, but not flash :) von andi k, 30. 12. 2006, 19:54
nach unten

sound buttons, but not flash :)

Die folgende Nachricht zum Thema stammt von: andi k, 30. 12. 2006, 19:54

Hallo hab ein problem mit meinem script, es sagt mir immer
document.all.sound.scr = null oder klein objekt

hier das script, buttons sollen beim drafclciken ect einen ton abspielen:

<script language="javascript">
function abspielen()
{
if (document.all)
document.all.sound.scr = "http://www.midistern.de/gewehr1.wav";
}

</script>

<a onclick="abspielen()" href="...">test</a>


Ich hab im internet nachgeschaut und dann ist irgendwie sowas entstanden, hab leider fast keine ahnung von js, bitte helft mir.

mfg

nach obennach unten

sound buttons, but not flash :)

Die folgende Nachricht zum Thema stammt von: Gernot Back, 02. 01. 2007, 10:55

Hallo andi,

»» Hallo hab ein problem mit meinem script, es sagt mir immer
»» document.all.sound.scr = null oder klein objekt

Was ist "es", welcher Browser meldest dies?

»» hier das script, buttons sollen beim drafclciken ect einen ton abspielen:

»» <script language="javascript">
»» function abspielen()
»» {
»» if (document.all)
»» document.all.sound.scr = "http://www.midistern.de/gewehr1.wav";
»» }

»» </script>

»» <a onclick="abspielen()" href="...">test</a>

Wo und wie hast du in deinem HTML-Code denn den Sound eingebunden? Hat das entsprechende Element denn überhaaupt eine ID mit dem Wert "sound"? Warum probierst du es statt mit "document.all.sound" nicht mit "document.getElementById('sound')", das verstehen auch mehr Browser.

Gruß Gernot

nach oben
Teil von SELFHTML Forum Teil von SELFHTML Forumsarchiv Teil von 2006 Teil von Dezember

© 1998-2008 Seite Impressum, Software: Classic Forum