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

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World