bookmarks within framed site

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis Allen

    #1

    bookmarks within framed site

    Hi. I was wondering if someone here could help.

    I'm working with a simple framed web site, www.stargazing.net/mas/index.htm.
    A left side called frame.htm, and the right side called home.htm. In head
    section of home.htm I have the following JavaScript line:

    if (document.locat ion.hash != "#noframes" && typeof(top.locs rch) !=
    "string") document.locati on = "index.htm"

    .... If anyone calls an individual web page (example:
    www.stargazing.net/mas/photos2.htm) all they have to do is click [return to
    home], which runs home.htm. With this line of code, home.htm will then
    return you to the framed site.

    Just one problem. Suppose I want to get to a bookmark in home.htm, as in
    http://www.stargazing.net/mas/home.htm#observatory home.htm ignores it and
    launches me back to the framed site. Question. Is there a way to get
    passed this barrier and to the bookmark?

  • Thomas 'PointedEars' Lahn

    #2
    Re: bookmarks within framed site

    Dennis Allen wrote:
    [color=blue]
    > I'm working with a simple framed web site,
    > www.stargazing.net/mas/index.htm.
    > A left side called frame.htm, and the right side called home.htm. In head
    > section of home.htm I have the following JavaScript line:
    >
    > if (document.locat ion.hash != "#noframes" && typeof(top.locs rch) !=
    > "string") document.locati on = "index.htm"[/color]

    Don't do that. What about users without client-side script support?
    Besides, document.locati on has been deprecated long before, use
    (window.)locati on instead. And `typeof' is an operator, not a method.
    (No parantheses required.)


    PointedEars

    Comment

    Working...