I'm using viewer.js (<http://viewerjs.org/>) to view pdf's on a website, and I want to pull the attribute "title" from the iframe code to title the document.

At the moment the code is as follows

`<iframe id="viewer" src = "/ViewerJS/#../demo/ohm2013.odp" width='400' height='300' allowfullscreen webkitallowfullscreen></iframe>`

and I want to be able to do this

`<iframe id="viewer" src = "/ViewerJS/#../demo/ohm2013.odp" width='400' height='300' allowfullscreen webkitallowfullscreen title="Document Title"></iframe>`

I know the bit of code in the js file I need to edit is as follows

```
document.getElementById("documentName").innerHTML=document.title

```

and I tried the following but with no luck

```
document.getElementById("documentName").innerHTML=document.attr('title')

```

I'm just not sure how to get the attribute.

The full source code for viewer.js can be viewed at <http://viewerjs.org/ViewerJS/viewer.js>