SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    Dec 2011
    Posts
    221
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Simple Frame refresh

    Greetings!

    I have frames A, B and C.
    I have links of menu in A
    When I click it, content will display in frame B which has a links too.
    and when I click it, content will display in frame C.

    My problem is whenever I clicked other links from A(topnav) menu, the content of frame C remains.

    I have home.html displayed in frame C as default.
    I want also to show this default page when user clicked new menu in A.

    I hope I made myself clear.
    I've attached image just in case.
    Thank you.

    1.png

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,196
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    This is one of the main reasons why iframes are considered bad practice, much better solutions to get around this is to use Ajax driven content which is a big leap from an iframe but has an easy code base to work with depending on whether you choose to use vanilla JS or a library such as jQuery.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2011
    Posts
    221
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your response.
    Is vanilla easy to use?

  4. #4
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,196
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Vanilla JS is just JavaScript, basically it's just a coding term to say that your not using any libraries such as jQuery which is vanilla JS built into a easy to work with DOM manipulation library which fixes the cross browser compatibility issues.

  5. #5
    SitePoint Addict
    Join Date
    Dec 2011
    Posts
    221
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the new term. Can you recommend a good source, tutorials for that?

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,297
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Off Topic:

    Guys, I've moved this to the JavaScript forum, because this looks like more of a programming issue.

  7. #7
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chris.upjohn View Post
    This is one of the main reasons why iframes are considered bad practice, much better solutions to get around this is to use Ajax driven content which is a big leap from an iframe but has an easy code base to work with depending on whether you choose to use vanilla JS or a library such as jQuery.
    Frames are bad practice, so lets do the same thing in an even LESS accessible manner -- RIGHT.

    Do yourself a favor, build it with includes using a CGI/SSI and forget this frame nonsense or worse, AJAX for nothing. Page-loads aren't evil and to be frank if your content is 'big enough' for page-load to be an issue, it's time to break it into more sub-pages. (or take a good hard look at semantics and separation of presentation from content)

    As Dan Schulz said shortly before passing, AJAX is the new Framesets... and he did NOT mean that as a compliment.

  8. #8
    SitePoint Addict
    Join Date
    Dec 2011
    Posts
    221
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Greetings!

    I followed one of the suggestion and I found this tabber.js. I'm working with php.
    I thought I'm saved from this frustration. Seems like require() and include() function is not working well.
    PHP Code:
    <div class="tabber">

         <div class="tabbertab">
          <h2>Student</h2>
          <p><?php require("student/stud_view.php");?><a href = 'student/stud_view.php'>asdf</a></p>
         </div>


         <div class="tabbertab">
          <h2>Instructor</h2>
          <p>Tab 2 content.</p>
         </div>


         <div class="tabbertab">
          <h2>Staff</h2>
          <p>Tab 3 content.</p>
         </div>

         <div class="tabbertab">
          <h2>Administrator</h2>
          <p>Tab 3 content.</p>
         </div>
         
    </div>
    Any help would be appreciated.


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
  •