Solved

R5 Frames - Referencing a field in another frame set

Posted on 2001-07-09
12
244 Views
Last Modified: 2013-12-18
In R5 I have 2 frames (top bottom).

The bottom frame has a formula to add 1 to a counter, and then does a Refresh on the top frame.

What I need to do is have the top frame know what the new value of this counter is. So, either I have to be able to add 1 to the counter in the top frame, or pass the value back to the top frame.
0
Comment
Question by:GaryZ
  • 6
  • 6
12 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6265684
Use something like this in onLoad event of the frameset, which will refer the frame2 and set the count field

onLoad="parent.frames[0].document.forms[0].Count.value=parent.frames[1].document.forms[0].Count.value"


~Hemanth

0
 

Author Comment

by:GaryZ
ID: 6265727
Not working for some reason. On the inital load of the frameset I set the counter to 0 in the top frame and to 1 in the bottom, onLoad shows 0 and when the counter is updated in the bottom frame the top frame is stil showing 0.
0
 

Author Comment

by:GaryZ
ID: 6265770
Ah, I think the problem is that the top frame is not being refreshed, I do have the value changing on the initial load.

I have the following code in the button to refresh:

FIELD F6_ShowSection := F6_ShowSection + 1;
@If(F6_ShowSection > F6_MaxSections; @SetField(F6_ShowSection;F6_MaxSections);"");
@SetTargetFrame("Top");
@Command([FileSave]);
@Command([ViewRefreshFields])
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6265792
That is right you have to refresh( and you menioned that in the question) the top frame and if you include the JS code whic I posted in onload event will always refer to the frame 2 counter.

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6265797
That is right you have to refresh( and you menioned that in the question) the top frame and if you include the JS code whic I posted in onload event will always refer to the frame 2 counter.

~Hemanth
0
 

Author Comment

by:GaryZ
ID: 6265852
Something is not correct.

1. Notes is not refreshing the top frame, if I refresh using the browser button, then the field is refreshed from the bottom frame.

2. For some reason, the "hide-whens" no longer work. At first I had the default value set to the value of the field, and nothing displayed (all hidden). I then changed the default vaue to 1, and the first section displays. When I refresh the complete screen (using the browser refresh button), the counter changes to 2 (from bottom frame), however, the first section still displays, not Section 2.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6266046
Just open the form in a browser and test , then see what happens without frameset

0
 

Author Comment

by:GaryZ
ID: 6266102
The frameset being refreshed is the bottom one not the top. I put a "hide-when" in the bottom frame based on the counter and that is working.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 200 total points
ID: 6266547
You can achieve that by using JS only

For that do this

Have this html Code in the bottom frame

[<Input Type=Button onClick="doThis()">]

[<Script>

function doThis() {

parent.frames[0].src=parent.frames[0].src + "&CountVal=" + parent.frames[1].Count.value + "&"

}
</Script>]

Function doTHis would change the source of the frame with appeneded countval. In the top frame have a hidden field called Query_String_Decoded. This will have the variable "&Countval=x&". Use this to delimit the value and set the counter. This should be done in frame onload event like this
onLoad="document.forms[0].Count.Value=document.forms[0].query_string_decoded.value"

Try this and let me know

~Hemanth
0
 

Author Comment

by:GaryZ
ID: 6268987
When I click on the hotspot, I get a third frame that looks the same as the bottom frame.
0
 

Author Comment

by:GaryZ
ID: 6269233
The "bottom" frame has a counter (F6_ShowSection) that gets incremented when a hotspot is clicked.

The counter has the following code in the onClick event:

parent.frames["top"].document.forms[0].F5_ShowSection.value=document.forms[0].F6_ShowSection.value

The hotspot is updating the counter and not creating a new frame.

The "top" frame has the counter (F5_ShowSection), but the value is not being passed to the top, I am assuming I need to get the top frame to refresh to get the value.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6277081
If you refresh the frame, the values will be lost, but if you pass that as the source to the frame then it is retained and aswell it is refreshed.

If you want I can take a look at your db and apply the functionality. Because i have done this sometime ago and is working well.

mailto:Hemanthakumark@bigfoot.com

~Hemanth
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Modify The View Selection Criterion through a Button 10 26
Lotus Notes 41 184
How to automate deletion of content in Lotus Notes mailboxes 3 207
IBM Lotus Notes Rules not working 5 110
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now