Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    noframes/to frames circle

    I'm sure this is a classic problem...

    I've set up a NOFRAMES page with links to the various pages contained in the frames so the viewer can see them individually in the main window, using the browser's back arrow to get back to the NOFRAMES page.

    I've also put the following code on each page so that if the visitor comes through to a page in the main window they will be sent to the FRAMESET page:

    function checkifframes(){
    if (top.frames.length==0)
    top.location="FRAMESET.html"
    }

    <body onLoad="checkifframes();">

    The problem, of course, is that if the viewer's browser doesn't support frames, when they click on a link in the NOFRAMES page they will catch a quick glimpse of the linked page before being sent on to the FRAMSET page and back to the NOFRAMES page. i.e. one big circle.

    Is there an easy way to get round this?

    (If it's a lot of hassle I'll just forego one of the options. In that case, am I right in thinking the NOFRAMES page will help more visitors? I won't be placing any keywords in the META tags on the other pages, so not much chance of someone coming through to one of the other pages, I guess; although I realize that isn't the only way search engines work).

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: noframes/to frames circle

    Is there an easy way to get round this?
    The easy way round it is not to use frames.

    But I'm not sure this problem will happen anyway. Have you tested your site in a noframes browser to see what does happen? I would have thought that such browsers:

    1 - would return undefined for the frames array, so you could discriminate with if(document.frames && document.frames.length==0) to prevent noframes browsers from executing the code

    2 - don't support javascript anyway, so maybe the only situation where a browser would support javascript but not frames is where a user has specifically disabled frames support ... not sure what you can do for the 1 in a billion people who fit into that category ...

    But really ... you know the best solution is not to use frames.
    Last edited by brothercake; 08-07-2002 at 09:17 PM.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So really there isn't a problem. Yes, I was one of the 6 who turned frames off in my browser - but only to test it. I assmed doing that was the same as using a noframes browser.

    Thanks for replying, brothercake.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No worries.

    Get a copy of Lynx - with no frames support and no javascript, it's purely text. It's very good for accessibility testing, and also gives you a good idea of how your site looks to a search robot.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I use a Mac, but I went to the Lynx site and there is a beta for the Mac (MacLynx). However, it says that it supports frames. I don't suppose you'd know an alternative for the Mac?

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Get Opera 6 - www.opera.com

    It allows you to turn off certain features, such as frames, css, etc.

  • #7
    Regular Coder
    Join Date
    Jul 2002
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks jkd, but that's the same as IE - I can turn frames off in that as well. Per brothercake's reply, I need a browser which doesn't support frames at all.


  •  

    Posting Permissions

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