Reputation: 1037
I need to refresh the content of the object element after updating its file path like below.
<input type="file" onchange="$('#oPdf').attr('data',this.value')" />
<object id="oPdf" data='[path]' type="application/pdf" width="500px" height="100%"></object>
The value is set, but it doesn't seem to be updated using javascript.
I've managed to do it inside iframe, but I don't won't to use an iframe.
Upvotes: 2
Views: 2378
Reputation: 567
your question has been answered here: <object> tag doesn't refresh when its data attribute is changed in Chrome
You may have some problems with it as isn't a standard yet.
Good luck ;)
Upvotes: 2