Frames, Framesets, and Submit

I have searched this forum and have found a few references to my problem, but no solution that works for me.

I have a frameset with 2 frames. Links within frame 1 (index) launch in frame 2 (body) as do links in frame 2 (body).

Everything works fine if I open an existing document and close it, I’m right back to the view I started in within frame 2. But, when I create a new document (which opens correctly in frame 2, and save it, instead of returning to the view in frame 2, I get the entire frameset in frame 2.

My $$Return links back to the $$ViewTemplateDefault form, so I expect to see the default view in frame 2.

The initial launch on my database is for the frameset, but when I change this to “as last viewed” I am presented with the default list of views within the database in frame 2 instead.

Any help on this would be greatly appreciated.

Subject: RE: Frames, Framesets, and Submit

It sounds like this is a web application.

I’m not sure, in that context, what you mean when you talk about “closing” a document.

The exact $$Return formula is obviously important here, and I’m not sure why you didn’t post it.

You shouldn’t return to the $$ViewTemplateDefault form; return to a view. The view template form will take care of itself.

Subject: RE: Frames, Framesets, and Submit

Yes, it’s a web application. Here’s my $$Return:

who:= CreatedBy;

Stat := Status;

Save := SaveOptions;

@If(Save = “1” & Stat = “Pending”; @Return(“

Thank you, " + who + “for your submission”+”


Return to Contractor’s view"); “[/CJF.nsf/Contractors?OpenView]”)

Subject: RE: Frames, Framesets, and Submit

I suspect the $$Return may be returning an erroneous value. That @Return might also be a problem; I don’t know that, but I do know it’s unnecessary.

Without knowing more about your form, it’s hard to say what the error might be, though it’s almost certainly a datatype mismatch issue. Try the following formula:

_tmp := @If(SaveOptions = “1” & Status = “Pending”; “

Thank you, " + CreatedBy + " for your submission


Return to Contractor’s view”; “[/CJF.nsf/Contractors?OpenView]”);

@IfError(_tmp; @Text(_tmp))

There’s no need to create temporary variables just to hold the value of one field. It reduces readability, is less efficient, and makes the formula longer. Just use the original fieldname.

Subject: RE: Frames, Framesets, and Submit

Your suggestions worked perfectly. Thanks.