Mhd. Yasseen
Mhd. Yasseen

Reputation: 1037

Reloading Content of Object With New PDF file

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

Answers (1)

Filipe Melo
Filipe Melo

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

Related Questions