javascript - Error handling loading pdf in object tag -
i dynamically displaying pdf object tag based on name, there chance name added without pdf getting added. handle , @ least display text rather leaving blank space when pdf isn't found.
this have:
document.getelementbyid("someid").innerhtml = "<object data=\"" + somename + ".pdf\" type=\"application/pdf\" width=\"500\" height=\"500\">you don't have pdf plugin browser.</object>";
is there way can use use html or javascript when file doesn't load? also, need support ie7.
Comments
Post a Comment