Web Analytics Made Easy -
StatCounter accessing frameset properties - CodingForum

Announcement

Collapse
No announcement yet.

accessing frameset properties

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • accessing frameset properties

    Hi,

    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,
    Sam

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

    Comment


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

      Comment


      • #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:
        ************
        <html>
        <head>
        <title>Contracting Opportunities On Line (COOL)</title>
        <script LANGUAGE="JavaScript">
        <!--
        self._domino_name = "_MainFrame";
        // -->
        </SCRIPT>
        </head>

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

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

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

        If you need anything else, let me know.
        Sam

        Comment


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

          Comment

          Working...
          X