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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying Documents

    I have a question regarding displaying documents on a website. I currently have a website which uses iframes to display word, excel and pdf files so users can either make changes to the document or print the document without having to dig through the server for the files. Recently though I changed the layout and design of the site and am now using side pop out menus which when you want to go to a sub menu will cause it to display behind the document. My understanding is that the documents are considered active objects and no matter waht will always be displayed on top. My question is there any other way to display this documents without using a iframe or a way to allow the menus to display over the content? The site it self is based off a CSS template and the menu uses a seperate CSS.

    So far I have tried to treat the iframe as a transparent object, changed the z-index and a couple various other code changes, but frankly web development isnt my feild, so bare with me please =)

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    An iframe is a GUI component and is always 'on-top'-- you can't fix it with z-index.

    Unfortunatly, the only solutions seem to be not using an iframe, or moving the menu.

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there anything other method you could reccomend for displaying documents?

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    open in a new window?

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is kind of a last resort. The director who is over seeing this doesnt like multiple windows, thats why I tried the iframe approach. I will end up using that if I have to, but was hoping for another method of embedding objects. There wouldnt be anything in maybe php that would allow me to do this?

    Thanks again for the help I appreciate it!

  • #6
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    If the file didn't have to be on the page, couldn't you put a link to it, then it would download and display itself...or just take screenshots of the files and put those on your site

  • #7
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the replies guys. I have come up with a solution. I used a onmouseover event so when a element of the menu that has sub menus is highlighted with the mouse the iframe will hide itself. This allows me to display the content that I need on the page and still be able to use the pop out menus.

    Here is the code I used.

    <div
    id="feature"
    style="display: none;">
    <iframe
    src="doc_owa.pdf"
    scrollbars="auto"
    width="100%"
    height="500">
    </iframe>
    </div>

    I put this with each menu link that has a sub-menu

    <span
    id="viewiframe"
    onmouseover="DoViewIFRAME('viewiframe','hideiframe','owaiframe');"
    style="line-height: 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: sans-serif;
    color: brown;
    background-color: gold;">
    <nobr>[View IFRAME]</nobr>
    </span>
    <span
    id="hideiframe"
    onmouseover="DoHideIFRAME('hideiframe','owaiframe','viewiframe');"
    style="display: none;
    line-height: 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: sans-serif;
    background-color: brown;
    color: gold;">
    <nobr>[Hide IFRAME]</nobr>
    </span>

    Lastly the Jacascript that makes it work

    <script type="text/javascript" language="JavaScript"><!--
    function DoViewIFRAME(tid1,tid2,tid3) {
    document.getElementById(tid1).style.display = "none";
    document.getElementById(tid2).style.display = "";
    document.getElementById(tid3).style.display = "";
    }
    function DoHideIFRAME(tid1,tid2,tid3) {
    document.getElementById(tid1).style.display = "none";
    document.getElementById(tid2).style.display = "none";
    document.getElementById(tid3).style.display = "";
    }
    //--></script>


  •  

    Posting Permissions

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