When I open a ‘new’ document, it opens in a new window and everything closes fine. When I open an ‘existing’ document, it opens in a frameset and saves, but when you click the CLOSE button on the “Thank you for submitting” page, it does nothing.
The following code is in my $$Return field and always seems to return A - never sees B.
A:=@Return(“
Thank you for…
<a href="javascript.window.close()">Close New Window”);
B:=@Return(“
Thank you for…
<a href=/”+ @ReplaceSubstring(@Subset(@DbName;-1);“\”;“/”)+“/Author?openview>Close Window”);
@If(IsNewDoc=“1”;A;B)
Both formulas work properly individually, but when they are put together, only A is read whether it’s a new document or not.
Any help is greatly appreciated!
Heidi
Subject: @If(IsNewDoc) to Close a Window in a Frame
It’s not the @If, it’s the @Return. If it were possible to do a “post-process” examination, you would find that your variable A contains @True, since it was possible to @Return the value in the statement. The lines following that line never execute.
Subject: So in other words:
A:=“
Thank you for…
<a href="javascript.window.close()">Close New Window”;B:=“
Thank you for…
<a href=/” + @ReplaceSubstring(@Subset(@DbName;-1);“\”;“/”)+“/Author?openview>Close Window”;
@If(IsNewDoc=“1”; A; B)
Subject: RE: So in other words:
I have to take that back… it finally worked correctly for an ‘existing’ document… but when it’s a new document, I want the window to just close completely, not change to a view. Because initially when the document is NEW, it opens in a NEW window. When the document is being editted, it opens in a frameset.
Any more ideas?? Please 
Subject: RE: So in other words:
THANK YOU SO MUCH! That worked like a charm!!