SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)

    Which doctype should I use (in this case)?

    Hallo all,

    I'm wondering what doctype I should use for a new page.

    The setup is this:
    A motorcycle company with which we have a partnership has an old site built out of frames. Currently, one of their links goes to our server so visitors can get an insurance quote (or other things). I've been asked to redo this page, and as with our other partner companies, I plan to make it resemble the partner's home site. I've successfully copied the other sites, as the links were no problem, but on this particular page, the links I need to recreate go back to framed pages on the partner site.

    My page will NOT have frames, but since the links need to go to the correct frame on the destination page, I still need their target attributes, right? Or not? If I look at just the destination, then only that frame of their page loads-- this would leave visitors who ended up on our server but wanted to move to other links on the partner's page with the correct frame but not the rest of the page.

    I want that if someone's on our insurance page on our server, that clicking on the links on the side not only go to the correct frame but load the whole partner page, just as if it were a normal (non-framed) page.

    Do I use Frameset doctype and keep all their link into (target too) or just my normal HTML4.01 Strict?

  2. #2
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    After exploring the site some more (written in Adobe GoLive!), I'm thinking I'm going to try to get around having those links on the page. Still, my question stands, if a non-framed page has links to external frames and thus uses the target attribute, should that page have the Frameset doctype? Or am I being stupid in my understanding of how all that works?

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, you should only use the Frameset DTD if you need to include a frameset. Normal pages within a framed site should use the Transitional DTD which allows the target attribute.

    I'm still not clear on what you're trying to do here. You can't link from an external page to a frame in a frameset. You'll then have to link to the frameset page and pass some parameter that instructs it to load a particular page in its content frame.

    If your external page is opened within their frameset, then you don't need to worry about target at all. You can link directly to the page you want, because the default is to open links within the same frame. In this case, you can use a Strict doctype and sleep well at night.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    You can't link from an external page to a frame in a frameset. You'll then have to link to the frameset page and pass some parameter that instructs it to load a particular page in its content frame.
    That right there is the answer to my question, thanks. I hoped to "recreate" the other company's page, so that the visitor to our site didn't have to first go Home and then via the rest of the partner's menu. But, they do, so I've eliminated their menu entirely and there's just Home (and the other links which pertain to us, and don't need frames). The
    "pass some parameter that instructs it to load a particular page in its content frame"
    thing... is this something JS can do? Just curious.

    Thanks again. The number of beers I owe you is getting kinda ridiculous.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although you could do it with JavaScript, it's not something I'd recommend. This sort of thing should be handled by a server-side script, not client-side. Otherwise you'll shut out anyone with JavaScript unsupported, disabled or blocked.

    You'd link to something like http://example.com/frameset.php?page=gadgets and the PHP script would create the frameset page and make sure that the 'gadgets' page was loaded in the main content frame.
    Birnam wood is come to Dunsinane


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
  •