JS: Accessing the other frame element

HiGot a strange issue to work on.

We have a Notes Web UI that loads two frames UPPER and LOWER.

I have no control over what the design elements of the UPPER frame. Which in general holds navigation links to other pages of the application which again we do not have control over.

I have 2 Link tags on the UPPER frame left and right. Both when clicked thows me out of my app.

No I need to assing a onMouseDown listener event to those two tag elements names LEFT and RIGHT in the UPPER frame.

How do I be able to get access to the elements left and Right from my LOWER frame?

I have tried the following to get a handle to the top frame document and so far unsuccessful. They all retun undefined objects. Am I missing something?

window.parent.frames[1];

parent.forms[‘_top’];

parent.frames[‘UPPER’];

parent.frames[1];

document.UPPER;

document.forms[0];

document.forms[‘_top’];

Appreciate any help.

Thank you in advance.

Subject: JS: Accessing the other frame element

parent.UPPER.document.forms[0]

Subject: RE: JS: Accessing the other frame element

hmmmm… that did n’t help. However something like this is working in Plain HTML/JavaScript: ‘parent.UPPER.LeftLnk.onmousedown’ but its not working in Notes JavaScript.

Subject: RE: JS: Accessing the other frame element

You said you had no access to change the content of the upper frame. Are these pages on the same server? If not, your script will never have permission to access the other frame’s content.

Subject: RE: JS: Accessing the other frame element

Yep both the frames are on the same domain but different servers. and both are using https:\ (port: 443)

Subject: RE: JS: Accessing the other frame element

If they’re not on the same server, then both need to have the same document.domain property. By default, that value includes the server. In other words, you need to have the target frame contents changed or you won’t be able to access the content.

Subject: RE: JS: Accessing the other frame element

for testing I just loaded my own UPPER frame which loads a form with a single link and button. So that the UPPER and LOWER frames and its contents are all now loading from the same server. Still that didnt help to get to the UPPER frame elements.

Still looking for solution…