Script Problem mit Firefox
reno
- javascript
0 Struppi0 Dracophagos
Hallo,
Ich habe ein Problem mit follgenden Script. Ich bekomme immer vogende Fehlermeldung in der Javascript-Konsole: Warnung: Die nicht standardgemäße Eigenschaft document.all wurde verwendet. Verwenden Sie stattdessen den W3C-Standard document.getElementById().
Kann mir da jemand einen Tip geben? Mit besten Dank Reno
<!--
function openWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
var eypos=-100, ejump=-4;
var typos=-150, tjump=-4;
var kypos=-200, kjump=-4;
var bypos=-250, bjump=-4;
var delay=4;
function do_dress() {
if(typos>-150) {
tjump=-4;
if(typos>=25)
acces_fahren();
}
if(kypos>-200) {
kjump=-4;
if(kypos>=25)
kombi_fahren();
}
if(bypos>-200) {
bjump=-4;
if(bypos>=25)
ball_fahren();
}
ejump=-ejump;
if(eypos<=-100 || eypos>=25)
dress_fahren();
}
function dress_fahren() {
if(document.layers) document.dress.top=eypos; else document.all.dress.style.top=eypos;
eypos+=ejump;
if(eypos>-230 && eypos<25)
setTimeout("dress_fahren()", delay);
}
function do_acces() {
if(eypos>-100) {
ejump=-4;
if(eypos>=25)
dress_fahren();
}
if(kypos>-200) {
kjump=-4;
if(kypos>=25)
kombi_fahren();
}
if(bypos>-200) {
bjump=-4;
if(bypos>=25)
ball_fahren();
}
tjump=-tjump;
if(typos<=-150 || typos>=25)
acces_fahren();
}
function acces_fahren() {
if(document.layers) document.acces.top=typos; else document.all.acces.style.top=typos;
typos+=tjump;
if(typos>-270 && typos<25)
setTimeout("acces_fahren()", delay);
}
function do_kombi() {
if(eypos>-100) {
ejump=-4;
if(eypos>=25)
dress_fahren();
}
if(typos>-150) {
tjump=-4;
if(typos>=25)
acces_fahren();
}
if(bypos>-200) {
bjump=-4;
if(bypos>=25)
ball_fahren();
}
kjump=-kjump;
if(kypos<=-200 || kypos>=25)
kombi_fahren();
}
function kombi_fahren() {
if(document.layers) document.kombi.top=kypos; else document.all.kombi.style.top=kypos;
kypos+=kjump;
if(kypos>-250 && kypos<25)
setTimeout("kombi_fahren()", delay);
}
function do_ball() {
if(eypos>-100) {
ejump=-4;
if(eypos>=25)
dress_fahren();
}
if(typos>-150) {
tjump=-4;
if(typos>=25)
acces_fahren();
}
if(kypos>-200) {
kjump=-4;
if(kypos>=25)
kombi_fahren();
}
bjump=-bjump;
if(bypos<=-200 || bypos>=25)
ball_fahren();
}
function ball_fahren() {
if(document.layers) document.ball.top=bypos; else document.all.ball.style.top=bypos;
bypos+=bjump;
if(bypos>-250 && bypos<25)
setTimeout("ball_fahren()", delay);
}
//-->
Kann mir da jemand einen Tip geben? Mit besten Dank Reno
Dieses Skript wurde ausschließlich für Browser der 4'er Generation geschrieben. Benutze ein anderes.
Struppi.
Hallo,
Ich habe ein Problem mit follgenden Script. Ich bekomme immer vogende Fehlermeldung in der Javascript-Konsole: Warnung: Die nicht standardgemäße Eigenschaft document.all wurde verwendet. Verwenden Sie stattdessen den W3C-Standard document.getElementById().
Tu's doch einfach. FF hat recht.
Ansonsten: warum postest Du Macromedia-Code? Schmeiß ihn lieber weg. Den verstehst Du eh nicht. Mußt Du auch nicht :-)