Results 1 to 3 of 3

Thread: Trying to target a DIV to another navigation DIV on same page.

  1. #1
    Join Date
    Mar 2012
    Battle Ground, Washington

    Trying to target a DIV to another navigation DIV on same page.

    I have a website that is built with legacy frames. Its a typical content frame on the left so a person can click on links on the left and open pages in the main frame to the right
    in the main target frame of the page.

    I have for months been trying to figure out the best way to update my site so I can use newer technologies since regular
    frames are going to be deprecated soon. So here are my questions.....

    1) I have an accordion Navigation Menu built as a left side NAV DIV. So what should I use to target the main body of the webpage?
    Should I use IFrames or is there a way to target a DIV from another DIV?

    2) If I am able to click on a contents DIV and have the URL links open in another div on the page what sort of code do I use
    to tell the targeted DIV to open that URL based on the hyperlink being clicked on? Here is an example image of what I am trying to do

    Attachment 15381

  2. #2
    Join Date
    Mar 2011
    I thought this topic had been covered here before, but if you want to mimic frames, you'll either need some JavaScript to handle the process, or replace the content <div> with an <iframe> and set the 'target' attribute on the menu links to point to the <iframe>. And any links in the content pages will similarly need to be aware of their environment and have appropriate 'target' attributes or embedded JavaScript.

    It would be far easier and better for the long-term performance and maintenance of your website to use a conventional webpage structure that has both the content and navigation links in the same document. There are many good reasons why frames have a bad reputation. If you want to have a single file to hold the navigation links, there are several methods available like PHP includes, Server Side Includes, or even JavaScript that will do the job without all of the encumbrances of frames or pseudo-frames.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Feb 2013
    Can you post lik to present content?

    If you are just using links on thumbnails to display larger image version in another space on page, just name/id the large image holder (do NOT include width or height unless a large images are exact same measurement) and add onClick or orMouseOver to thumbnails
     <img src="13-big.jpg" alt="holder" id="holder" name="holder">
    <img  src="12-001thumb.jpg"
          alt="12-001big" title="12-001big">

Thread Information

Users Browsing this Thread

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

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