Results 1 to 8 of 8

Thread: linking help

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default linking help

    Ok i really dont know how to say this so i made a pic in photoshop


    What i need is the links on the left to stay there the whole time and load the linked pages in the content area.


    Thanks for any help.

    PS i think this is done in js but im not for sure.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    1. Duplicate the links in every page. (Too much work; too hard to keep consistent, or to update)

    2. Use frames. (Just a bad idea, for a few reasons.)

    3. Use a server side language to include the menu on each page, such as PHP. Using include(), this is not difficult. Or, you could use SSI (server side includes), which are a bit simpler in use and don't require php, simply that SSI is enabled on your server. This is the best solution.

    4. You could use an external .js file to write those links into the html, but this isn't the best option as a user without Javascript would have no access.

    5. You could try a dynamic (ajax, probably) layout, where the links don't load a new page, but content into the existing page. The Ajax Tabs script in the dd library is like this.


    There have been MANY topics on this subject, so search through some old threads for lots of answers.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    Code:
    but this isn't the best option as a user without Javascript would have no access.
    Wouldn't AJAX have these same issues? After all, it is Javascript if I am not mistaken.
    Trinithis

  4. #4
    Join Date
    Apr 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink

    There are lots of options as mentioned by Daniel. Depending on you usability you can choose any.

    The simplest method would be Frames, here you wouldn't have to use any scripting. Simple targetting of frames would work.

    2nd, I would go for Ajax. As mentioned by Daniel, there are lots of scripts available, you can try them.

  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 Raj View Post
    There are lots of options as mentioned by Daniel. Depending on you usability you can choose any.

    The simplest method would be Frames, here you wouldn't have to use any scripting. Simple targetting of frames would work.

    2nd, I would go for Ajax. As mentioned by Daniel, there are lots of scripts available, you can try them.
    Yes, the simplest method would be frames. Here is a frameset technique that doesn't have (all) the disadvantages of frames.

    Arie Molendijk.

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Correct, Trinithis. However, the difference with Ajax is that it usually has a non Javascript fallback (<a href="page.htm" onclick="ajax(this.href); return false;">), and using javascript to actually set the links into each page would have NOTHING there if javascript wasn't enabled, without any possible fallback (since the idea is having them updated through the single external .js file).
    Important to note: be sure to have a fallback if you do use Ajax.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you for you help

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    the difference with Ajax is that it usually has a non Javascript fallback (<a href="page.htm" onclick="ajax(this.href); return false;">)
    s/usually has/should have/

    Also, it's not really AJAX in the way that you're describing it, since it (probably) wouldn't need to use XML.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •