Web Analytics Made Easy -
StatCounter accessing frameset properties - CodingForum


No announcement yet.

accessing frameset properties

  • Filter
  • Time
  • Show
Clear All
new posts

  • accessing frameset properties


    I have a frameset which contains a navigator function I've created in the top frame, and a form in the bottom frame. In the form's onLoad event, I'm trying to call a function contained in the top page's <HEAD> tag. When I first load the frameset, it loads fine, but when I use the navigator to jump to a different form on the bottom and the onLoad event is called again, I get a "Permission denied" error.

    The forms I'm using have the following function:

    if(parent.frames[0] && parent.frames[0].Go) {parent.frames[0].Go();}

    If I put an alert(parent.frames[0]) statement just before this statement in the onLoad event, I get an [object] message back. However, if I try to call any property of parent.frames[0] in the alert statement, such as parent.frames[0].name, I get the error. So, for some reason, I have access to the frame object, but not the properties of the frame object. I get the same problem if I call the frame by name (i.e. parent.frames['navig']).

    Any ideas why I wouldn't be able to do this?

    Thanks in advance,

  • #2
    try changing it from parent.xxx to top.xxx


    • #3
      Thanks, I tried it with the same result. I can access the object but not the properties of the object. Any other ideas??


      • #4
        Here's some more info: in IE, the error message is:

        Line: 79
        Char: 1
        Error: Access is denied.
        Code: 0

        In Netscape, it is:

        Error: uncaught exception: Permission denied to get property window.frames.

        Here's my HTML for the frameset...nothing special:
        <title>Contracting Opportunities On Line (COOL)</title>
        <script LANGUAGE="JavaScript">
        self._domino_name = "_MainFrame";
        // -->

        <frameset ROWS="14*,86*">

        <frame NORESIZE NAME="navig" SRC="/mydatabase.nsf/TopPage?OpenPage">

        <frame NORESIZE NAME="space" SRC="/mydatabase.nsf/BottomPage?OpenPage">

        If you need anything else, let me know.


        • #5
          Can you post the code for the top frame with the Go function?