This is my html code:
[CODE]<object type=”application/pdf” id=”cat_frame” class=”iframe_pdf” data=”pdfs/letter.pdf”>
<param name=”src” value=”pdfs/letter.pdf” />
</object>
This is my javascript function which works for iframes, but not for objects:
[CODE]function change_pdf(object,file){
document.getElementById(object).data=file;
document.getElementsByTagName(‘param’).value=file;
}
In my links, I call the function by saying:
onclick=”change_pdf(‘cat_frame’, ‘contents.pdf’);” inside the <a> tag.
Why won’t this work for object tags, but it will for iframes?
Also, is there a way to make sure that the embedded PDF on the page is transparent such as the wmode for Flash makes it transparent for other <div> to lay over it?