Click to See Complete Forum and Search --> : Crossbrowser script


Jomaja
04-07-2003, 06:06 AM
Hi!

I wonder if somone know a good source where you can learn how javascript has to be written to work in all browsers, and on mac.

The following functions don't seem to work in NS. Would be more than greatful for any help!

===============================
function PhotosSuchen(){ //an OnChange-Event
var Suchausdruck = "";
if(document.EingabePhotos.select3.value != "") {
Suchausdruck = Suchausdruck + "Typ = " + document.EingabePhotos.select3.value;
document.all.Pics.object.Filter = Suchausdruck;
document.all.Pics.Reset();
document.all.Anzeigetabelle.dataSrc = "#Pics";
}
}

=================================

function ShowElement(whatPic) {
document.all.PremiumPic.innerHTML= "<img src=\"" + Bild3[whatPic].src + "\">";
}

===================================

function show(whatLayer) {
if(document.getElementById)
document.getElementById(whatLayer).style.visibility = "visible";
}

pyro
04-07-2003, 07:18 AM
It doesn't work in NN because document.all is an IE only property. Try document.getElementById instead.