Updating frame references on your staging Web site

If your staging Web site contains any link that points to the _top frame (either through a target attribute set to the value _top, or through JavaScript), such a link will not work correctly while a user is editing the Web page. To fix this, change such target reference in one of several ways.

Procedure

  1. If the target frame of the link is a direct parent of the source frame, explicitly point to the parent frame instead. For plain HTML links, this means setting the target attribute to the value _parent; for JavaScript, this means using window.parent.
  2. Alternatively, in a more complex scenario, if you use JavaScript and you can find out the distance from the source frame to the target frame, use an expression such as window.parent.parent.parent, where the number of parent items corresponds to the distance to the target frame.
  3. Alternatively, if you use HTML links, or if the frame structure is more complex or dynamic, give the target frame of the link a name using the following JavaScript assignment:
    window.name="my_named_topframe"

    where my_name_topframe is the name of the top frame on your Web page.

    You can now refer to the frame by name from plain HTML using target="my_named_topframe", or from JavaScript using top.frames["my_named_topframe"].