jquery - Fallback image and timeout - External Content. Javascript -


What is the best way to set up a local fallback image if the external image does not load or too much time to load

You can add a carrier handler:

  Lt; Img src = "http://example.com/somejpg.jpg" onerror = 'this.onerror = null; Src = "./ oops.gif" '/ / gt;  

Establish terror to nullify the handler so that the browser does not die if oops.gif can not be loaded for any reason.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -