Tip

Open a new frameset from a View Doc Link

This is an alternate solution for the problem where two frames need to be loaded with different content. This code solves that problem.

Instead of opening a new frameset, the Left ( navigation ) frame and the Main ( content ) frame are both refreshed.

Once you get this working, you can add a button to the form in the main frame that will return you to the original frame content in both frames.

 JSHeader On View Template Form: Navigation FrameName is left Framename for Frame containing the View template is main function change2Frames(URL1, URL2) { parent.left.document.location.href=URL1 parent.main.document.location.href=URL2; } View Column Formula using @Commands: Projects.ByCompany is a view template DocKey is a hidden field that contains the Unique Doc ID Label is the viewable text in the anchor tag LeftNav is the form that contains the Navigation label:=@Left(Owner;28); path:= @ReplaceSubstring("/" + @Subset(@DbName; -1);"";"/"); URL1 := path + "/LeftNav?OpenForm"; URL2 := path + "/Projects.ByCompany/" + DocKey + "?OpenDocument"; Combo1 := "javascript:change2Frames(\'" + URL1 + "\',\'" + URL2 + "\')"; "[<a href=" + Combo1 + ">" + label + "</a>]" Button on the main form in the 2nd frameset using JavaScript. This returns you to the default View path = location.pathname; pos = path.indexOf(".nsf"); path = path.substring(0, pos+5); IDKey = document.forms[0].DocKey.value; URL1 = path + "LeftNavView?OpenForm"; URL2 = path + "Projects.ByCompany?OpenView"; change2Frames(URL1, URL2)

This was first published in June 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.