Defer non-essential javascript issue
-
Seems mostly everything works, but im running into one small but major issue for me. When I enable “defer non-essential javascript”, no_photo.gif fails to load….
here is the snippet in the .php file:
$img_output = "<img onclick='window.location=\"".$link."\";' title='Parting Out ".$title."'onerror='ImgError(this, \"no_photo.gif\");' class='main_photo_img' src='";
After doing some research, it seems that the script containing the ImgError function is being deferred before the image tries to load. From what I can gather, this timing issue can cause the function not to be available when the image fails to load, so its unable to produce “no_photo.gif”
any work around?The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Defer non-essential javascript issue’ is closed to new replies.