• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Sound in Java Script einbinden

Robse

New member
Hi Leute!

Könnte mir jemand bei diesem Script helfen? Wie kann ich erreichen das ich ein Soundfile einbinde? Also Beispiel: Wenn ich auf den Link klicke soll das "Klicken" von Windows kommen. Wie geht das? wird das im Script gemacht oder ganz normal im HTML? Wenn ich es da mache funktioniert es aber nicht!

document.WM = new Object();
document.WM.menu = new Object();
document.WM.menu.dropdown = new Array();

function WM_initializeToolbar(){
var i;
if (document.all){
for(i = 0; i < document.all('container').all.length; i++){
if ((document.all('container').all.className == 'header') ||
(document.all('container').all.className == 'links')){
document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= document.all('container').all;
}
}
} else if (document.getElementsByTagName && document.getElementById){
var contained =
document.getElementById('container').getElementsByTagName('div');
for(i = 0; i < contained.length; i++){
if ((contained.getAttribute('class') == 'header') ||
(contained.getAttribute('class') == 'links')){
document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= contained;
}
}
}
}

function WM_collapse(item){
if(document.WM.menu.dropdown.length){
if (document.WM.menu.dropdown[item + 1].style.display == 'none'){
document.WM.menu.dropdown[item + 1].style.display = '';
if(document.WM.menu.dropdown[item].id == 'menue'){
document.images[document.WM.menu.dropdown[item].id +
'Img'].src = '../library/images/open_gray.gif';
} else {
document.images[document.WM.menu.dropdown[item].id +
'Img'].src = '../library/images/proveo-unten.gif';
}
} else {
document.WM.menu.dropdown[item + 1].style.display = 'none';
if(document.WM.menu.dropdown[item].id == 'menue'){
document.images[document.WM.menu.dropdown[item].id +
'Img'].src = '../library/images/closed_gray.gif';
} else {
document.images[document.WM.menu.dropdown[item].id +
'Img'].src = '../library/images/proveo-rechts.gif';
}
}
}
}

function WM_imageSwap(daImage, daSrc){
var objStr,obj;

// Check to make sure that images are supported in the DOM.
if(document.images){
// Check to see whether you are using a name, number, or object
if (typeof(daImage) == 'string') {
// This whole objStr nonesense is here solely to gain compatability
// with ie3 for the mac.
objStr = 'document.' + daImage;
obj = eval(objStr);
obj.src = daSrc;
} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
daImage.src = daSrc;
}
}
}

Wäre für jede Hilfe dankbar!

Cu

Robse
 
Zurück
Oben