Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I load a .pdf iinto a table cell

    I want to display a .pdf file in a table cell on a web page and I worked out that the following Active X statement would do it. I am told Active X is very prone to being used by miscreants to get malware spread so I would like to use Javascript instead. What is the Javascript equivalent to this please:


    <object width="100%" height="550" align="middle">
    <embed src="Downloads2/Drawing%20with%20WORD%20v3.pdf" width="100%" height="700" align="middle"></embed>
    </object>

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    there is no javascript equivalent (unless u want to dynamically generate the embed element in javascript). pdf is not a format that is recognized by the browser and requires the plugin from adobe to render it

    another way to do the same thing is to put it an iframe
    Code:
    <iframe src="Downloads2/Drawing&#37;20with%20WORD%20v3.pdf" width="100%" height="700"></iframe>
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Shyam - thanks for that. I have never used iframes before (I am not a web developer more an enthusiastic amateur).

    Is there a way of letting the user increase the display width of the iframe to the whole screen width (and I have yet to work out why my pdf display is not the width of my banner headline)

    If you take a look at

    http://homepages.tesco.net/keithhowe...web2/index.htm

    and select either tutorial or examples you will see what I mean


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •