hello i am a newbie to Javascript with a in depth background of PHP
i have a simple script that replaces missing images when the webpage
loads
but i just cant get it to validate in JLint as my javascript skills
are not up to scratch yet
please can somebody help me validate this and ensure that it functions
correctly
function fixBrokenImages (){
var imglst = document.images ;
for(var i = 0; i < imglst.length; i++){
imglst[i].onerror = function()
{this.src = "/noimage.png";}
imglst[i].src = imglst[i].src;
}
}
Thanks in advanced
Mr Daniel Lee - London UK
i have a simple script that replaces missing images when the webpage
loads
but i just cant get it to validate in JLint as my javascript skills
are not up to scratch yet
please can somebody help me validate this and ensure that it functions
correctly
function fixBrokenImages (){
var imglst = document.images ;
for(var i = 0; i < imglst.length; i++){
imglst[i].onerror = function()
{this.src = "/noimage.png";}
imglst[i].src = imglst[i].src;
}
}
Thanks in advanced
Mr Daniel Lee - London UK
Comment