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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -