Results 1 to 5 of 5

Thread: navigation iframe help?

  1. #1
    Join Date
    Feb 2008
    Posts
    25
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default navigation iframe help?

    Hello, and thanks for the help in advance.

    I am using the Dynamic Drive Chrome Drop Down Menu and I want to edit all of my navigation at once so I use the following code:
    Code:
    <script type="text/javascript">
    document.write('<iframe name="menu" src="menu.html" style="position:absolute; left:-10000px; display:none;width:0px;height:0px" frameborder="0"></iframe>');
    function extractMenuFromIframe(){
    document.body.innerHTML+=frames['menu'].document.body.innerHTML}
    window.onload=extractMenuFromIframe;
    </script>
    (http://molendijk.110mb.com/include_m...ckertree1.html)
    The problem is that to use the chrome menu i have to use some css and some scripts for it to do anything. the iframe acts as if those don't exist, and it shows it plain, no drop down or anything.
    How could I get it to show?
    Thanks,
    Nailgun

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    You should put chrome.js and chromestyle.css (and possibly the gifs as well) AFTER the script, in each page containing the script.
    So:
    - the script (extractMenuFromIframe);
    - chrome.js and chromestyle.css

    You can insert js-files and css-files in the standard way. If you don't know how to do that, let me know. (It's very simple indeed).
    ----
    Arie Molendijk.

  3. #3
    Join Date
    Feb 2008
    Posts
    25
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks, But i found out that with a regular iframe no border or scrolling it works just fine. Sorry for the trouble.

  4. #4
    Join Date
    Feb 2008
    Posts
    25
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy ?

    Since I'm using this for my navigation, is there a way to make clicked links open in the actual window and not the frame???

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Quote Originally Posted by Nailgunpro View Post
    Since I'm using this for my navigation, is there a way to make clicked links open in the actual window and not the frame???
    The normal way of targeting the (main) window containing an iframe is (in the iframe): 'href="bla.html" target="_top"'. But since I don't have the source of your pages, I don't know if that is what you need.
    ---
    Arie.

Bookmarks

Posting Permissions

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