OK, it's confirmed, the javascript hides all images placed on the page (not
those within the CSS). So the javascript code must somehow not work properly
on the MAC. Wonder what it is.


function isLoadedImage( obj ) {
 if (!obj.complete) {
  return false;
 }
 if ( typeof obj.naturalWidth != "undefined" && obj.naturalWidth == 0 ) {
  return false;
 }

    return true;
}

function checkImage() {
 for ( var i = 0; i < document.images.length; i++ ) {
  if ( !isLoadedImage( document.images[ i ] ) ) {
   document.images[ i ].style.visibility = "hidden";
  }
 }
};
myWindow.doAddOnloadListener( checkImage );



On 7/3/07, Taco Fleur <[EMAIL PROTECTED]> wrote:
>
> Is anyone able to test www.sellmystuff.com.au on a MAC?
> In particular
> http://www.sellmystuff.com.au/buystuff/generalstuff/parent-category.cfm?categoryIdentity=1
> thanks
>
>
> On 7/3/07, Taco Fleur <[EMAIL PROTECTED]> wrote:
> >
> > Hello all,
> >
> > I am using the following javascript on a site to remove any images that
> > do not load. It seems to remove ALL images on MACs, anyone any ideas on
> > this? Obviously for some reason it returns false all the time, but why?
> >
> >
> > function isLoadedImage( obj ) {
> >  if (!obj.complete) {
> >   return false;
> >  }
> >  if ( typeof obj.naturalWidth != "undefined" && obj.naturalWidth == 0 )
> > {
> >   return false;
> >  }
> >
> >     return true;
> > }
> >
> > function checkImage() {
> >  for ( var i = 0; i < document.images.length; i++ ) {
> >   if ( !isLoadedImage( document.images[ i ] ) ) {
> >    document.images[ i ].style.visibility = "hidden";
> >   }
> >  }
> > };
> > myWindow.doAddOnloadListener( checkImage );
> >
> >
> > --
> > http://www.clickfind.com.au
> > The new Australian search engine for businesses, products and services
> >
>
>
>
> --
> *** { . } { . } ****
> http://www.clickfind.com.au
> The new Australian search engine for businesses, products and services
>



-- 
*** { . } { . } ****
http://www.clickfind.com.au
The new Australian search engine for businesses, products and services

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to