Originally Posted by
Luckychap
Your code is not working because for the first time when rotate is called document.banner is undefined. And setting properties to undefined objects (documet.banner.src = somthing) result in crash.
So when ever you want to set the property to any HTML element in javascript, first check that if it is defined yet or not and apply properties only when they are defined.
if(document.banner)
document.banner.src = bannerRotate[ getNewBanner ];
so you meant that the problem is from this code??
Ok, is it necessary to use that code?
if(document.banner)
document.banner.src = bannerRotate[ getNewBanner ];
please could anyone explain to me just why we used (document.banner.src)???
it is not defined I mean in my whole code there's no (banner) so where did it comes from? and how it works?
thanks in advance

will be much more appreciated..
Last edited by Q8iEnG; Dec 2nd, 2008 at 5:51 am.