www.webdeveloper.com
Results 1 to 7 of 7

Thread: Javascript with Iframes

  1. #1
    Join Date
    Mar 2010
    Posts
    20

    Unhappy Javascript with Iframes

    I have designed 3 iframes and I have been making the navigation bar with CSS/XHTML but the results are quite heavy

    What I have is:

    ---------------------
    Navigation Iframe
    ---------------------
    Content Iframe
    ---------------------
    Footer Iframe
    ---------------------

    1. The "navigation" Iframe contain the navigation bar and this should let me click and : go to START, PREVIOUS page, NEXT page, LAST page, PRINT Page, and SHOW a PDF of the actual page.
    2. Every page requested in the "navigation" iframe will be deployed in the "content" Iframe

    3. Ammount of pages: 5 pages
    4. I have 5 pdf
    5. If I design this just with XHTML and CSS will work in everypage BUT will be quite heavy


    I wonder if I could do the same in JavaScript and using iframe??

    Thank you for everything

  2. #2
    Join Date
    Jan 2009
    Posts
    18
    Maybe you need to learn more about framesets. This is much easy to handle than iframes.


    http://www.w3.org/TR/html4/present/frames.html


    Learn about targeting to content frame from navigation frame

  3. #3
    Join Date
    Mar 2010
    Posts
    20
    Frames do not helps to the accesibility more than iframes, then I can still looking for the right code.

    I apreciate so much your contribution.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Why do you consider CSS/XHTML to be a 'heavy' solution, compared to JavaScript?
    At least 98% of internet users' DNA is identical to that of chimpanzees

  5. #5
    Join Date
    Mar 2010
    Posts
    20
    If you think XHTML/CSS its an easier solution accord what I need, then you should post the easier way it is rather than ask me what you ask.

    Havent you read the context I said?

    ---
    # The "navigation" Iframe contain the navigation bar and this should let me click and : go to START, PREVIOUS page, NEXT page, LAST page, PRINT Page, and SHOW a PDF of the actual page.
    ---

    IF you can do this avoiding JAvaScript, I'll apreciate you could write and let me understand that is not heavy just by XHTML/CSS
    Thank you

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    I have designed 3 iframes and I have been making the navigation bar with CSS/XHTML but the results are quite heavy
    You write it has been designed and is heavy. Why would adding JavaScript on top of your code make it less 'heavy'?
    Without seeing the existing design, we can not see how to improve it.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  7. #7
    Join Date
    Mar 2010
    Posts
    20
    If I want to use a NEXT PAGE link in 5 pages by using "iframes" will not be a problem just by BUT if you ned much more pages , then I think JAvaScript code will help a lot
    This is the code:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    @import url("css/arm.css");
    -->
    </style>

    <script Language="javascript">

    function printfile()
    {
    window.frames['pictures'].focus();
    window.frames['pictures'].print();
    }

    </script>
    |
    </head>

    <body>
    <div id="wrapper">
    <div id="header">
    <iframe id="header" src="header.html" ></iframe>
    </div>
    <div id="content">
    <iframe id="pictures" src="arm001.html" Scrolling="no"> </iframe>

    </div>
    <div id="footer"><iframe id="footer" src="footer.html" > </iframe></div>
    </div>
    </body>
    </html>
    The look U can see it here:
    http://www.pixelperu.net/iframe/iframe.jpg/iframe

    The content should be showed in the Iframe content
    The header iframe have next code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">@import url("css/arm.css");</style>

    </head>

    <body>
    <div id="header">
    <div class="navBar">First Page | Next page | Back page | Last page | <p><input type="button" value="Print" onclick="javascript: printfile();"></p></div>

    </body>
    </html>
    I hope you can get what I mean.

    Thank you in advance.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles